JSFileApi: Difference between revisions

Jump to navigation Jump to search
797 bytes added ,  30 September 2011
(→‎Flags: -lastAccessTime, split from →‎Interfaces)
(→‎Flags: +doc)
Line 146: Line 146:
== Flags ==
== Flags ==
   
   
=== Flags for file opening ===
Note that these flags are separated for performance+portability reasons. Each category of flag is meant to be or-ed.
     Open: {
     Open: {
  /**
  /**
        * Open for reading, writing or both.
        *
  * @enum {number}
  * @enum {number}
  */
  */
  Access: {
  Access: {
            /** Open file for reading */
      READ:  ...,
      READ:  ...,
            /** Open file for writing */
      WRITE:  ...,
      WRITE:  ...,
  },
  },
Line 159: Line 166:
  */
  */
  Content: {
  Content: {
            /** Create file if it doesn't exist*/
      MAY_CREATE:...,
      MAY_CREATE:...,
    APPEND:    ...,
            /** Write at the start of file if it exists. If not specified, append.*/
      OVERWRITE: ...,
      OVERWRITE: ...,
  },
  },
Line 168: Line 176:
  */
  */
  Pragma: {
  Pragma: {
            /** Windows-specific pragma: use Posix-style file names, i.e. two file names who differ only in case should not be collapsed*/
      POSIX_SEMANTICS:    ...,
      POSIX_SEMANTICS:    ...,
            /** Windows-specific pragma: optimize cache for sequential access*/
      SEQUENTIAL_ACCESS:  ....
      SEQUENTIAL_ACCESS:  ....
            /** Windows-specific pragma: optimize cache for random access*/
      RANDOM_ACCESS:      ...,
      RANDOM_ACCESS:      ...,
            /** Windows-specific pragma: do not buffer writes*/
      WRITE_THROUGH:      ...
      WRITE_THROUGH:      ...
  }
  }
     },
     },
   
   
== Flags for seeking in a file ==
     Seek: {
     Seek: {
  /**
  /**
Line 198: Line 215:
  },
  },
     },
     },
 
== Interfaces ==
== Interfaces ==
   
   
184

edits

Navigation menu