Am Dienstag 06 Juli 2010 schrieb thron7:
> As qooxdoo runs in the browser, and the browser is sand-box'ed, there is
> no traditional file I/O interface. You can read files, though, with the
> usual XHR techniques.
It's also possible to use something like Google Gears to access local files (or 
some html5 equivalent?) via putting the file in a local store and accessing it 
from there without the need for the server to do something.

Another possibility would be when the application is executed from the local 
filesystem to use the browser-specific file handling:

  function(filePath)
  {
          
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
          var file = 
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
          file.initWithPath(filePath);
          if(!file.exists())
            return null;

          var inputStream = Components.classes["@mozilla.org/network/file-
input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
          inputStream.init(file,0x01,00004,null);
          var sInputStream = 
Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
          sInputStream.init(inputStream);
          var contents = sInputStream.read(sInputStream.available());
          sInputStream.close();
          inputStream.close();
          return contents;
  }

for Mozilla browsers.
It seems special solutions exist for mozilla, internet explorer and opera to 
access files when running in a local context.

In such a use case remote request need to be cross site.

Heiko

-- 
Nexst4 GmbH
Arndtstrasse 12
01099 Dresden

Tel.: +49 (351) 655 76 70
Fax:  +49 (351) 655 76 66
Mail: [email protected]

Geschäftsführer: Alf Thiele, Matthias Schmidt
Sitz der Gesellschaft: Dresden
Handelsregister: Amtsgericht Dresden HRB 27274

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to