171
edits
m (Noted Kevin's elections for mkdir and mkdirs (by way of him having implemented them in Narwhal by those names)) |
m (→File System Object: purged use of "environment" name.) |
||
| Line 8: | Line 8: | ||
== File System Object == | == File System Object == | ||
The "file" module would conform to the File System API, as well as objects returned by "chroot". There is no definitive implementation of a FileSystem class, so "chroot" is the only way to construct new objects that conform to the FileSystem API. In permissive | The "file" module would conform to the File System API, as well as objects returned by "chroot". There is no definitive implementation of a FileSystem class, so "chroot" is the only way to construct new objects that conform to the FileSystem API. In permissive platforms, the "file" module may have direct access to ambient authority through a foreign function interface, or may itself be a dynamically loaded module. In secured platform, the "file" module must copy the properties of "system.fs" onto its exports. | ||
In a secure sandbox, the following statements would be equivalent. | In a secure sandbox, the following statements would be equivalent. | ||
require('file').open(foo) | require('file').open(foo) | ||
system.fs.open(foo) | |||
Since "fs" must be frozen to be secure, there is no need for the "file" module to assemble aparatus for late binding to "fs" methods. | Since "fs" must be frozen to be secure, there is no need for the "file" module to assemble aparatus for late binding to "fs" methods. | ||
| Line 212: | Line 212: | ||
* returns a new object that implements the file system API that uses the directory at the given path as its root. Resolves the path relative to the current working directory. | * returns a new object that implements the file system API that uses the directory at the given path as its root. Resolves the path relative to the current working directory. | ||
** chroot(path) | ** chroot(path) | ||
== Paths == | == Paths == | ||
edits