| DAZ Script | |
|---|---|
| Filters | { Dirs, Files, Drives, NoSymLinks, AllEntries, All, TypeMask, Readable, Writable, Executable, PermissionMask, RWEMask, Modified, Hidden, System, AccessMask, AllDirs, CaseSensitive, NoDotAndDotDot, NoDot, NoDotDot, NoFilter } |
| SortFlags | { Name, Time, Size, Unsorted, SortByMask, DirsFirst, Reversed, IgnoreCase, DirsLast, LocaleAware, Type, NoSort } |
| DAZ Script | |
|---|---|
| String | cleanPath ( String path ) |
| DzDir | current () |
| String | currentPath () |
| String | fromNativeSeparators ( String pathName ) |
| DzDir | home () |
| String | homePath () |
| Boolean | isAbsolutePath ( String path ) |
| Boolean | isRelativePath ( String path ) |
| Boolean | match ( String filter, String fileName ) |
| Boolean | match ( Array filters, String fileName ) |
| DzDir | root () |
| String | rootPath () |
| String | separator () |
| Boolean | setCurrent ( String path ) |
| DzDir | temp () |
| String | tempPath () |
| String | toNativeSeparators ( String pathName ) |
Provides access to the file system directory structure. It provides functions for creating, removing, traversing, and searching directories.
String : cleanPath( String path )
Return Value:
Since:
DzDir : current()
Return Value:
See Also:
Since:
String : currentPath()
Return Value:
See Also:
Since:
String : fromNativeSeparators( String pathName )
Return Value:
pathName using '/' as the path separator instead of the native path separator.See Also:
Since:
DzDir : home()
Return Value:
See Also:
Since:
Return Value:
Attention:
Since:
Boolean : isAbsolutePath( String path )
Return Value:
true if path is absolute, otherwise false.Since:
Boolean : isRelativePath( String path )
Return Value:
true if path is relative, otherwise false.Since:
Boolean : match( String filter, String fileName )
Return Value:
true if fileName matches the wildcard (glob) pattern filter, otherwise false. The filter may contain multiple patterns separated by spaces or semicolons. The matching is case insensitive.Since:
Boolean : match( Array filters, String fileName )
Return Value:
true if fileName matches any of the wildcard (glob) patterns in the list of filters, otherwise false. The matching is case insensitive.Since:
DzDir : root()
Return Value:
See Also:
Since:
Return Value:
See Also:
Since:
Return Value:
Attention:
Since:
Boolean : setCurrent( String path )
Sets the application's current working directory to path.
Return Value:
true if the directory was successfully changed, otherwise false.See Also:
Since:
DzDir : temp()
Return Value:
See Also:
Since:
Return Value:
See Also:
Since:
String : toNativeSeparators( String pathName )
Return Value:
pathName with the '/' separators converted to separators that are appropriate for the underlying operating system. On Windows, '/' will be converted to '\'. On Mac OS X the returned string may be the same as pathName.See Also:
Since:
Creates a directory object with the given path.
Parameter(s):
String : absoluteFilePath( String fileName )
Parameter(s):
Return Value:
Since:
String : absolutePath()
Return Value:
Since:
String : canonicalPath()
Return Value:
Boolean : cd( String dirName )
Changes the current directory to dirName.
Parameter(s):
Return Value:
true if dirName exists and is readable, otherwise false.Changes the directory by moving one directory up from the current directory.
Return Value:
true if the new directory exists and is readable, otherwise false.Boolean : copy( String srcFile, String destFile )
Makes a copy of a file.
Parameter(s):
Return Value:
true if srcFile and destFile are the same or if the operation is successful, otherwise false.Return Value:
Since:
Return Value:
Array : entryList( String nameFilter, Filters filters=NoFilter, SortFlags sort=NoSort )
Parameter(s):
Return Value:
Array : entryList( Array nameFilters, Filters filters=NoFilter, SortFlags sort=NoSort )
Parameter(s):
Return Value:
Array : entryList( Filters filters=NoFilter, SortFlags sort=NoSort )
Parameter(s):
Return Value:
Since:
Return Value:
true if the directory exists, otherwise false.Attention:
false.Boolean : exists( String name )
Parameter(s):
Return Value:
true if the file exists, otherwise false.Attention:
name contains an absolute file path, the file name is assumed to be relative to the directory itself, so this function is typically used to check for the presence of files within a directory.Since:
String : filePath( String fileName )
Return Value:
file in the directory; does not check if the file actually exists.Attention:
Return Value:
Since:
Array : getFilesFromDir( Array extentions, Boolean recursive=true )
Parameter(s):
true, the retrieval of file paths should recurse sub-directories.Return Value:
Boolean : isAbsolute()
Return Value:
true if the directory's path is absolute, otherwise false.Boolean : isReadable()
Return Value:
true if the directory is readable and we can open files by name, otherwise false.Boolean : isRelative()
Return Value:
true if the directory path is relative, otherwise false.Return Value:
true if the directory is the root directory, otherwise false.Attention:
false. If you want to test for this use canonicalPath().Boolean : makeAbsolute()
Converts the directory path to an absolute path. If it is already absolute nothing happens.
Return Value:
true if the conversion succeeded, otherwise false.Since:
Boolean : mkdir( String dirName=“” )
Creates a new directory.
Parameter(s):
Return Value:
true if dirName does not already exist when this function is called and the sub-directory is successfully created, otherwise false.Boolean : mkpath( String dirpath=“” )
Creates all directories that do not already exist in dirpath.
Parameter(s):
Return Value:
true if successful (the path already exists when this function is called), otherwise false.Boolean : move( String srcFile, String destFile )
Moves a file to a new location.
Parameter(s):
Return Value:
true if srcFile and destFile are the same or if the operation is successful, otherwise false.Array : nameFilters()
Return Value:
Since:
Return Value:
void : refresh()
Refreshes the directory information.
String : relativeFilePath( String fileName )
Return Value:
file, relative to the current directory; does not check if the file actually exists.Boolean : remove( String fileName )
Removes fileName from this directory.
Parameter(s):
Return Value:
true if the file is removed successfully, otherwise false.Boolean : rename( String oldName, String newName )
Renames a file or directory from oldName to newName.
Parameter(s):
Return Value:
true if successful, otherwise false.Boolean : rmdir( String dirName=“” )
Removes a directory.
Parameter(s):
Return Value:
true if dirName exists when this function is called, the directory is empty and the sub-directory is successfully removed, otherwise false.Boolean : rmpath( String dirPath=“” )
Removes all directories that exist in dirpath, provided that they are empty. This is the opposite of mkpath().
Parameter(s):
Return Value:
true if successful, otherwise false.Boolean : setCurrent()
Sets the current working directory of the application to be this directory.
Return Value:
true if the current working directory was changed, otherwise false.void : setFilter( Filters filters )
Sets the filter used by entryList() to filters. The filter is used to specify the kind of entries should be returned by entryList().
Since:
void : setNameFilters( Array nameFilters )
Sets the name filters used by entryList() to the list of filters specified by nameFilters. Each name filter is a wildcard (globbing) filter that understands * and ? wildcards.
Since:
Sets the path of this directory to newPath.
void : setSorting( SortFlags sort )
Sets the sort order used by entryList(). The sort is specified by OR-ing values from the enum SortFlags.
Since:
Return Value:
Since:
String : absFilePath( String file )
Deprecated
Exists only to keep old code working. Do not use in new code. Use absoluteFilePath() instead.
Boolean : mkdirs( String dirName=“” )
Deprecated
Exists only to keep old code working. Do not use in new code. Use mkpath() instead.
Boolean : rmdirs( String dirName=“” )
Deprecated
Exists only to keep old code working. Do not use in new code. Use rmpath() instead.
Boolean : fileExists( String fileName )
Deprecated
Exists only to keep old code working. Do not use in new code. Use exists( String ) instead.
Deprecated
Exists only to keep old code working. Do not use in new code. Use absolutePath() instead.