JSFileApi: Difference between revisions

164 bytes added ,  3 October 2011
no edit summary
No edit summary
Line 21: Line 21:
       */     
       */     
     createTempDirectory: function() {
     createTempDirectory: function() {
  //Unix:    [FileUtilities.tmpdir] followed by [mkstemp] and [FileUtilities.openDirectory]
  //Unix:    [FileUtilities.tmpdir] followed by [mkdtemp] and [FileUtilities.openDirectory]
  //Windows: [FileUtilities.tmpdir] followed by [GetTempFileName] and [FileUtilities.openDirectory]
  //Windows: [FileUtilities.tmpdir] followed by [GetTempFileName] and [FileUtilities.openDirectory]
     },
     },
Line 55: Line 55:
     {
     {
  //Unix:    need to implement with [open], [read], [write], [close]
  //Unix:    need to implement with [open], [read], [write], [close]
        //          (check for existing library routines in Glib / Qt)
  //Windows:  maps to [CopyFile] http://msdn.microsoft.com/en-us/library/aa363851(v=VS.85).aspx
  //Windows:  maps to [CopyFile] http://msdn.microsoft.com/en-us/library/aa363851(v=VS.85).aspx
             //Check if it works with directories
             //Check if it works with directories
Line 143: Line 144:
             /** Create file if it doesn't exist*/
             /** Create file if it doesn't exist*/
      MAY_CREATE:...,
      MAY_CREATE:...,
            /** Create file; fail if the file already exists */
            MUST_CREATE:...,
             /** Write at the start of file if it exists. If not specified, append.*/
             /** Write at the start of file if it exists. If not specified, append.*/
      OVERWRITE: ...,
      OVERWRITE: ...,
184

edits