Jaxer.Filesystem : Object
Return to: Jaxer Framework index

File System Object contains methods useful for accessing the basic file and directory objects.

Platform Support

Jaxer Server FrameworkJaxer Client Framework
1.0no

Constructors

ConstructorActionJaxer Server FrameworkJaxer Client Framework
Jaxer.Filesystem Constructor(Object fsPath) : Jaxer.Filesystem
File System Object. This object is used as a functional wrapper to the file system. It can represent, folders, files, symlinks
Show Details1.0no

Jaxer.Filesystem(Object fsPath) : Jaxer.Filesystem

File System Object. This object is used as a functional wrapper to the file system. It can represent, folders, files, symlinks

Parameters
ObjectfsPathThe path to the filesystem object

Returns
Jaxer.FilesystemReturns an instance of Filesystem.

Properties

PropertyActionJaxer Server FrameworkJaxer Client Framework
dateModified : Object
The last modified timestamp as reported by the OS.
No Details 1.0no
exists : Boolean
A boolean indicator of whether the referenced object physically exists on the filesystem.
No Details 1.0no
isDir : Boolean
A boolean indicator of whether the referenced object is a folder/directory
No Details 1.0no
isExec : Boolean
A boolean indicator of whether the referenced object is an executable
No Details 1.0no
isFile : Boolean
A boolean indicator of whether the referenced object is a file
No Details 1.0no
isFolder : Boolean
A boolean indicator of whether the referenced object is a folder/directory an alias of as isDir
No Details 1.0no
isHidden : Boolean
A boolean indicator of whether the referenced object is hidden
No Details 1.0no
isReadable : Boolean
A boolean indicator of whether the referenced object is readable
No Details 1.0no
isSpecial : Boolean
A boolean indicator of whether the referenced object is special. NOTE: Not implemented on Mac and possibly other systems.
No Details 1.0no
isSymlink : Boolean
A boolean indicator of whether the referenced object is a symlink
No Details 1.0no
isWritable : Boolean
A boolean indicator of whether the referenced object is writable
No Details 1.0no
leaf : String
Get/Set the leaf (filename + extension) portion of the file path.
No Details 1.0no
nsIFile : Object
Returns a clone of the underlying nsIFile object.
No Details 1.0no
path : String
Returns the path of the refererenced filesystem object.
No Details 1.0no
permissions : String
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.0no
URL : String
Return the path of the referenced object as a file URL
No Details 1.0no

Functions

MethodActionJaxer Server FrameworkJaxer Client Framework
append(String leafname) : String
Changes the path of the filesystem object by appending the provided leaf value.
Show Details1.0no

Parameters
StringleafnameThe leafname to be appended

Returns
StringThe appended directory and leafname

Throws
Throws a Exception containing the error code.
appendRelativePath(String relative) : void
This method is used for appending a relative path to the current filesystem object
Show Details1.0no

Parameters
Stringrelativepath

Throws
Throws a Exception containing the error code.
equals(Object a) : Boolean
Evaluates whether the current filesystem object refers to the same file as the one provided as a parameter
Show Details1.0no

Parameters
Objectafile system object to be compared

Returns
Booleantrue if object refers to same filesystem object, false otherwise

Throws
Throws a Exception containing the error code.
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 Details1.0no

Parameters
Arrayaset of arguments

Returns
Stringthe file extension of the referenced filesystem object

Throws
Throws a Exception containing the error code.
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 Details1.0no

Parameters
Stringdestinationpath

Throws
Throws a Exception containing the error code.
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 Details1.0no
Throws
Throws a Exception containing the error code.
resetCache() : Boolean
Truncates the file referenced by the filesystem object.
Show Details1.0no

Returns
Booleantrue indicates success

Throws
Throws a Exception containing the error code.
aptana_docs