ServerJS/API/posix/ProposalK: Difference between revisions

From MozillaWiki
< ServerJS‎ | API
Jump to navigation Jump to search
(Preliminary posix module API for ServerJS)
 
mNo edit summary
 
Line 1: Line 1:
   
The idea behind this module is that it would be implemented as a native module on each respective platform and hosted by the default loader. Other IO modules would use these functions as a basis.
 
  /**
  /**
  */
  */

Latest revision as of 23:02, 18 February 2009

The idea behind this module is that it would be implemented as a native module on each respective platform and hosted by the default loader. Other IO modules would use these functions as a basis.

/**
*/

/*** open

    Accepts:

    - ``fileName``
    - ``mode``

    Returns a file descriptor of unspecified type.

    Modes
    =====

    Mode Meaning
    ==== ======================================================================
    "r"  read-only, starting at the beginning of the file
    "r+" read-write, starting at the beginning of the file
    "w"  write-only, truncates an existing file to empty or creates a new file
    "w+" read-write, truncates an existing file to empty or creates a new file
    "a"  write-only, starts at end of file if file exists or creates a new file
    "a+" read-write, starts at end of file if file exists or creates a new file
    "b"  binary file mode, may appear before any of the modes above
    

*/

/*** close
*/

/*** creat
*/

/*** flush
*/

/*** tell
*/

/*** stat
*/

/*** lstat
*/

/*** unlink
*/

/*** chown
*/

/*** chmod
*/

/*** dup
*/

/*** dup2
*/

/*** fctnl
*/

/*** ioctl
*/

/*** select
*/

/*** getcwd
*/