[Qt-qml] QML : js File handling

badrinath.chandi at nokia.com badrinath.chandi at nokia.com
Mon Jan 17 06:36:10 CET 2011


Hi ,

  Need one small help , I got struck up with filehandlers in java script. which I am importing to my main qml file.

it says "ReferenceError: Can't find variable: fopen" , pasted the following code.


function picturefile(theFolder) {
    var fso = new fopen ("Scripting.FileSystemObject");
    if(fso.folderExists(thefolder)){
        bbb=fso.GetFolder(thefolder)
        oFileColl = new Enumerator(bbb.files);
        abc = new Array();
        i=0
                   for (; !oFileColl.atEnd(); oFileColl.moveNext())
                   {
                       tempp = new String(oFileColl.item());
                       abc[i]=tempp;
                       i++;
                   }
}
    return abc;
}


basically i want to get the file names in a folder through this.

can anybody please help me with this?

Thanks & Regards,
Badri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110117/233ec15b/attachment.html 


More information about the Qt-qml mailing list