extras beyond what Node.js FileSystem provides More...
Public Member Functions | |
findClose (object inFindData) | |
stop and cleanup after a file/directory search More... | |
string[] | findDirs (string name) |
return a list of directories that match the given name More... | |
string[] | findFiles (string name) |
return a list of files that match the given name More... | |
object | findFirst (string inFindName) |
get the first matching file or directory More... | |
object | findNext (object inFindData) |
return the next matching file or directory More... | |
string | getApplicationDataDirectory () |
return the path to the location the application should store its user data More... | |
string | getApplicationDirectory () |
return the path to the location the application is installed More... | |
string | getApplicationResourceDirectory () |
return the path to the location where the application's internal resources are stored More... | |
Related Functions | |
(Note that these are not member functions.) | |
fs | |
the singleton instance of the FileManager More... | |
getFileManager | |
get the singleton instance of the FileManager used by the pdg framework More... | |
extras beyond what Node.js FileSystem provides
Most functions for file manipulation are provided by Node.js though the FileSystem class. The PDG FileManager just adds calls to get particular directory paths and to do file searchs.
findClose | ( | object | inFindData | ) |
stop and cleanup after a file/directory search
This takes the object returned from a findFirst() or findNext(), and cleans up after the search, releasing all resources used by the search.
inFindData | the object returned from a prior call to findFirst() or findNext() |
findDirs | ( | string | name | ) |
return a list of directories that match the given name
This uses the findFirst() and findNext() calls to search for any directories that match the name passed in. The name can contain wildcard characters (*.txt, or f1?.dat). If the name includes a path, it must use Unix format (forward slash "/" as path separators). Colon and backslash are both illegal characters.
name | the directory name to find |
findFiles | ( | string | name | ) |
return a list of files that match the given name
This uses the findFirst() and findNext() calls to search for any files that match the name passed in. The name can contain wildcard characters (*.txt, or f1?.dat). If the name includes a path, it must use Unix format (forward slash "/" as path separators). Colon and backslash are both illegal characters.
name | the filename to find |
findFirst | ( | string | inFindName | ) |
get the first matching file or directory
This searches for any files or directories that match the name passed in, and returns the first one it finds. The name can contain wildcard characters (*.txt, or f1?.dat). If the name includes a path, it must use Unix format (forward slash "/" as path separators). Colon and backslash are both illegal characters.
inFindName | the directory or file name to find |
findNext | ( | object | inFindData | ) |
return the next matching file or directory
This uses the object returned from a findFirst() call to continue the search and find additional matching files or directories.
inFindData | the object returned from a prior call to findFirst() or findNext() |
getApplicationDataDirectory | ( | ) |
return the path to the location the application should store its user data
getApplicationDirectory | ( | ) |
return the path to the location the application is installed
getApplicationResourceDirectory | ( | ) |
return the path to the location where the application's internal resources are stored
|
related |
get the singleton instance of the FileManager used by the pdg framework