Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents the interface for a node within the global file system. More...
#include <omFileSystemNode.h>
Public Member Functions | |
virtual | ~FileSystemNode () |
Destroy a file system node object. More... | |
UTF8String | getName () const |
Return the name of the file system node, the last component of its path. More... | |
virtual Bool | setName (const UTF8String &newName)=0 |
Set the name of the file system node, the last component of its path. More... | |
UTF8String | getExtension () const |
Return a string representing the extension of this node's file name. More... | |
const Path & | getPath () const |
Return a path object representing the path to this file system node. More... | |
const UTF8String & | getPathString () const |
Return a string representing the path to the file system node. More... | |
virtual Bool | isFile () const =0 |
Return whether or not the file system node is a file. More... | |
virtual Bool | isDirectory () const =0 |
Return whether or not the file system node is a directory. More... | |
Bool | isAtRoot () const |
Return whether or not the file system node is at the root level of the file system. More... | |
virtual Bool | exists () const =0 |
Return whether or not this file system node exists. More... | |
virtual LargeSize | getSize () const =0 |
Return the total size of the file system node. More... | |
virtual time::Date | getDateCreated () const |
Return the date when this file system node was created. More... | |
virtual time::Date | getDateModified () const |
Return the date when this file system node was last modified. More... | |
virtual Bool | create ()=0 |
Create this file system node if it doesn't exist. More... | |
virtual Bool | remove ()=0 |
Remove this file system node and all children (if it is a directory). More... | |
Protected Member Functions | |
FileSystemNode (const UTF8String &newPathString) | |
Create a file system node that is represented by the specified path string. More... | |
FileSystemNode (const Path &newPath) | |
Create a file system node that is represented by the specified path. More... | |
Protected Attributes | |
Path | path |
The path to this file system node. More... | |
A class that represents the interface for a node within the global file system.
A file system node can be either a file or a directory. The file system node allows the user to query basic properties of the node (size, path, name, type) and to create and remove the referenced file system node.
|
inlinevirtual |
Destroy a file system node object.
|
inlineprotected |
Create a file system node that is represented by the specified path string.
|
inlineprotected |
Create a file system node that is represented by the specified path.
|
inline |
Return the name of the file system node, the last component of its path.
|
pure virtual |
Set the name of the file system node, the last component of its path.
Implemented in om::fs::File, and om::fs::Directory.
|
inline |
Return a string representing the extension of this node's file name.
The extension is defined as the characters after the last period '.' in the node's file name.
|
inline |
Return a path object representing the path to this file system node.
|
inline |
Return a string representing the path to the file system node.
|
pure virtual |
Return whether or not the file system node is a file.
Implemented in om::fs::File, and om::fs::Directory.
|
pure virtual |
Return whether or not the file system node is a directory.
Implemented in om::fs::File, and om::fs::Directory.
|
inline |
Return whether or not the file system node is at the root level of the file system.
|
pure virtual |
Return whether or not this file system node exists.
Implemented in om::fs::File, and om::fs::Directory.
|
pure virtual |
Return the total size of the file system node.
For files, this is the total size of the file. For directories, this is the total size of all child file system nodes.
Implemented in om::fs::File, and om::fs::Directory.
|
virtual |
Return the date when this file system node was created.
|
virtual |
Return the date when this file system node was last modified.
|
pure virtual |
Create this file system node if it doesn't exist.
If the file system node already exists, no operation is performed and FALSE is returned. If the creation operation was not successful, FALSE is returned. Otherwise, TRUE is returned and the node is created.
Implemented in om::fs::File, and om::fs::Directory.
|
pure virtual |
Remove this file system node and all children (if it is a directory).
Implemented in om::fs::File, and om::fs::Directory.
|
protected |
The path to this file system node.