ServerJS/API/file/Names: Difference between revisions

add keyword-style open proposal
(Moved the function name discussion for the File API into a subpage.)
 
(add keyword-style open proposal)
Line 1: Line 1:
= API and Proposed Names =
= API and Proposed Names =


Line 186: Line 185:
*** c, canon (nonblocking)
*** c, canon (nonblocking)
** (Java: FileStream classes, Python: open, file, Ruby: File.new, universal precedent among SSJS frameworks)
** (Java: FileStream classes, Python: open, file, Ruby: File.new, universal precedent among SSJS frameworks)
** open([path,] {[path: path,] mode: "+arxwc", permissions: permissions, encoding: encoding})<br>(keyword-style parameters, first parameter is path or keyword object containing path)
*** Aristid Breitkreuz


* return a Dir object for a given directory path.  The path is resolved relative to the current working directory.  The Dir object is an bidirectional iterator of a snapshot of the contents of the directory, and may be either a lazy Array or genuine array, depending on whether the underlying implementation can retrieve indicies on demand.
* return a Dir object for a given directory path.  The path is resolved relative to the current working directory.  The Dir object is an bidirectional iterator of a snapshot of the contents of the directory, and may be either a lazy Array or genuine array, depending on whether the underlying implementation can retrieve indicies on demand.
62

edits