A collection of file related utilities not covered by the CommonJS standard fs module.
This class holds POSIX file permissions and can be used to manipulate permissions on POSIX-compatible systems with the Java NIO.2 API.
the POSIX permissions
PosixPermissions.prototype. toJavaFileAttribute ()
Returns a Java file attribute representing the POSIX permissions suitable for NIO.2 methods.
an object that encapsulates PosixFilePermissions
PosixPermissions.prototype. toJavaPosixFilePermissionSet ()
Returns a set of Java POSIX permissions suitable for NIO.2 methods.
a set of permissions
PosixPermissions.prototype. toString ()
createTempFile (prefix, suffix, directory, permissions)
Create a new empty temporary file in the default directory for temporary files.
the prefix of the temporary file; must be at least three characters long
the suffix of the temporary file; may be undefined or null
optional directory in which to create the file. Omit to use the system's temp file directory.
optional POSIX permissions to apply
the temporary file's path
Tests whether the file represented by this File object is a hidden file. What constitutes a hidden file may depend on the platform we are running on.
true if this File object is hidden
resolveId (parent, child)
Resolve path fragment child relative to parent but only if child is a a relative path according to the CommonJS Modules spec, i.e. starts with "." or "..". Otherwise, the child path is returned unchanged.
the parent path
the child path
Resolve an arbitrary number of path elements relative to each other. This is an adapted version of the file module's resolve function that always and strictly uses forward slashes as file separators. This makes it usable for resolving URI paths as well as module ids and resource paths. Originally adapted for helma/file from narwhal's file module.
number of path elements