JSFileApi: Difference between revisions

Jump to navigation Jump to search
233 bytes added ,  13 October 2011
Line 36: Line 36:
== Access a file or a directory ==
== Access a file or a directory ==
   
   
 
     /**
     /**
       * Create a temporary directory.
       * Create a temporary file in the system-defined temporary directory (if it exists). This file is deleted when the process closes or when the file is closed, whichever happens first.
       *
       *
      * Note: For the time being, there is no guarantee *when* the temporary directory is cleaned
       * @param {string=} name An optional name that can be used for debugging purposes as a template for the name of the file created.
      *
       */
       * @returns {RawDir} a descriptor which may be used to access this directory
     createTempFile: function(name) {
       */  
  //Unix:       uses cached [nsIDirectoryService] to get temporary directoy, [mkstemp] and [this.openFile]
     createTempDirectory: function() {
  //Windows:     uses cached [nsIDirectoryService] to get temporary directory, [GetTempFileName] + [CreateFile] http://msdn.microsoft.com/en-us/library/windows/desktop/aa363875%28v=vs.85%29.aspx
  //Unix:   [Files.tmpdir] followed by [mkdtemp] and [Files.openDirectory]
  //Windows: [Files.tmpdir] followed by [GetTempFileName] and [Files.openDirectory]
     },
     },
 
   
   
== General utilities ==  
== General utilities ==  
184

edits

Navigation menu