A collection of file related utilities.
- createTempFile(prefix, suffix, directory)
- resolveId(parent, child)
createTempFile (prefix, suffix, directory)
Create a new empty temporary file in the default directory for temporary files.
|String||prefix||the prefix of the temporary file; must be at least three characters long|
|String||suffix||the suffix of the temporary file; may be undefined or null|
|String||directory||optional directory in which to create the file. Pass undefined to use the system's default location for temporary files|
|File||the temporary file|
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.
|Boolean||Boolean 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.
|String||parent||the parent path|
|String||child||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.
|...||arbitrary||number of path elements|
An Array containing the system's file system roots. On UNIX platforms this contains a single "/" directory, while on Windows platforms this contains an element for each mounted drive.
The system-dependent file system separator character.