Utility object for filesystem directory access.
Platform Support
Jaxer Server Framework | Jaxer Client Framework | 1.0 | no |
---|
Constructors
Constructor | Action | Jaxer Server Framework | Jaxer Client Framework | |||||
---|---|---|---|---|---|---|---|---|
Jaxer.Dir Constructor(String aPath) : Jaxer.Dir
Creates a new Directory handle for performing filesystem directory operations.
|
Show Details | 1.0 | no | |||||
Jaxer.Dir(String aPath) : Jaxer.DirCreates a new Directory handle for performing filesystem directory operations. Parameters
Returns
|
Inherited Properties
Property | Action | Jaxer Server Framework | Jaxer Client Framework |
---|---|---|---|
The last modified timestamp as reported by the OS.
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object physically exists on the filesystem.
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is a folder/directory
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is an executable
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is a file
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is a folder/directory an alias of as isDir
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is hidden
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is readable
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is special. NOTE: Not implemented on Mac and possibly other systems.
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is a symlink
|
No Details | 1.0 | no |
|
|||
A boolean indicator of whether the referenced object is writable
|
No Details | 1.0 | no |
|
|||
Get/Set the leaf (filename + extension) portion of the file path.
|
No Details | 1.0 | no |
|
|||
Returns a clone of the underlying nsIFile object.
|
No Details | 1.0 | no |
|
|||
Returns the path of the refererenced filesystem object.
|
No Details | 1.0 | no |
|
|||
Get/Set the file permissions for the File object. this may be ignored/misreported by some versions of windows. on Windows,
you can only set the Read/Write bits of a file. And User/Group/Other will have the SAME settings based on the most-relaxed
setting (Read 04, 040, 0400, Write 02, 020, 0200). When a file is created, by default it has both Read and Write permissions.
Also, you cannot set the file permission to WRITE-ONLY, doing so would set it to read-write
|
No Details | 1.0 | no |
|
|||
Return the path of the referenced object as a file URL
|
No Details | 1.0 | no |
|
Functions
Method | Action | Jaxer Server Framework | Jaxer Client Framework | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
clone() : Jaxer.Dir
Clone a directory object
|
Show Details | 1.0 | no | |||||||||||
Returns
|
||||||||||||||
contains(Object aFileObj) : Boolean
Tests whether a file Object exists in the Physical directory referenced by the Dir object
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
create(String aPermissions) :
void
Creates a new folder under the referenced path of the directory object The format of the permissions is a unix style numeric
chmod i.e. 0777 or 444 on Windows, you can only set the Read/Write bits of a file. And User/Group/Other will have the SAME
settings based on the most-relaxed setting (Read 04, 040, 0400, Write 02, 020, 0200). When a file is created, by default it
has both Read and Write permissions. Also, you cannot set the file permission to WRITE-ONLY, doing so would set it to read-write
|
Show Details | 1.0 | no | |||||||||||
Parameters
|
||||||||||||||
createHierarchy(String aPermissions) :
void
Creates a hierarchy of folders as needed to contain the current folder's path. The format of the permissions is the same as
for the create method.
|
Show Details | 1.0 | no | |||||||||||
Parameters
|
||||||||||||||
createUnique(String aPermissions) :
void
Create a new unique folder under the referenced path of the directory object The format of the permissions is a unix style
numeric chmod i.e. 0777 or 444 on Windows, you can only set the Read/Write bits of a file. And User/Group/Other will have
the SAME settings based on the most-relaxed setting (Read 04, 040, 0400, Write 02, 020, 0200). When a file is created, by
default it has both Read and Write permissions. Also, you cannot set the file permission to WRITE-ONLY, doing so would set
it to read-write
|
Show Details | 1.0 | no | |||||||||||
Parameters
|
||||||||||||||
readDir() : Array<Jaxer.Filesystem>
Read the contents of a directory
|
Show Details | 1.0 | no | |||||||||||
Returns
|
||||||||||||||
remove(Boolean aRecursive) :
void
Removes specified folder from the file system
|
Show Details | 1.0 | no | |||||||||||
Parameters
|
||||||||||||||
static combine(String ...) : String
Combines any number of path fragments into a single path, using the current operating system's filesystem path separator.
Before joining two fragments with the path separator, it strips any existing path separators on the fragment ends to be joined
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static create(String path, String aPermissions) : Jaxer.Dir
Creates a new folder (directory) at the specified path and returns it The format of the permissions is a unix style numeric
chmod i.e. 0777 or 444 on Windows, you can only set the Read/Write bits of a file. And User/Group/Other will have the SAME
settings based on the most-relaxed setting (Read 04, 040, 0400, Write 02, 020, 0200). When a file is created, by default it
has both Read and Write permissions. Also, you cannot set the file permission to WRITE-ONLY, doing so would set it to read-write
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static createHierarchy(String path, String aPermissions) : Jaxer.Dir
Creates a hierarchy of folders as needed to contain the current folder's path. The format of the permissions is the same as
for the create method.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static exists(String path) : Boolean
Does the directory exist on disk?
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static grep(String path, [Object options]) : Array<Jaxer.File>
Scan a folder tree from the provided path and find files that match the provided regular expression pattern. The available
options properties are pattern : a string containing a regular expression i.e. "^.*\.js$" flags : the flags to use with the
regular express. i.e. "i" to ignore case recursive: true/false indication of whether to search sub folders for the match
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static map(String path, [Object options,] [Function(Jaxer.File)->Object fn]) : Array<Object>
Scan a folder tree from the provided path and find files that match the provided regular expression pattern and run the provided
function against each match
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static pathToUrl(String path) : null|String
Convert a native filesystem path to a URL format, which will begin with "file:...".
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static resolve(String pathToResolve, [String referencePath]) : String
Resolves a path to an absolute path on the filesystem, using as a reference (base) the given path or the current page's path.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static urlToPath(String url) : null|String
Convert a URL in string format to a native filesystem path. The URL must begin with "file:..."
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
Inherited Functions
Method | Action | Jaxer Server Framework | Jaxer Client Framework | |||||
---|---|---|---|---|---|---|---|---|
append(String leafname) : String
Changes the path of the filesystem object by appending the provided leaf value.
|
Show Details | 1.0 | no | |||||
Parameters
Returns
|
||||||||
appendRelativePath(String relative) :
void
This method is used for appending a relative path to the current filesystem object
|
Show Details | 1.0 | no | |||||
Parameters
|
||||||||
equals(Object a) : Boolean
Evaluates whether the current filesystem object refers to the same file as the one provided as a parameter
|
Show Details | 1.0 | no | |||||
Parameters
Returns
|
||||||||
initPath(Array a) : String
This method will initialize the file system object with the provided path information (or will attempt to derive the path
if an object is provided). An existing File object can be 'repointed' to a new physical file sytem object by invoking this
method.
|
Show Details | 1.0 | no | |||||
Parameters
Returns
|
||||||||
move(String destination) :
void
Move the referenced file to a new filesystem location provided as a parameter NOTE: after a move, 'this' will be reinitialized
to reference the moved file!
|
Show Details | 1.0 | no | |||||
Parameters
|
||||||||
normalize() :
void
As of Mozilla 1.7, the underlying XPCOM method is only implemented under UNIX builds (except for Mac OSX). This method will
fail if the path does not exist.
|
Show Details | 1.0 | no | |||||
|
||||||||
resetCache() : Boolean
Truncates the file referenced by the filesystem object.
|
Show Details | 1.0 | no | |||||
Returns
|