Module beamui.core.files
Cross-platform file access utilities.
Import line
import beamui .core .files;
Functions
Name | Description |
---|---|
appDataPath(subdir)
|
Returns application data directory. |
appendPath(pathItems)
|
Appends file path parts with proper delimiters
e.g. appendPath("/home/user", ".myapp", "config") => "/home/user/.myapp/config"
|
appendPath(buf, pathItems)
|
Appends file path parts with proper delimiters (as well converts delimiters inside path to system) to buffer
e.g. appendPath("/home/user", ".myapp", "config") => "/home/user/.myapp/config"
|
convertPathDelimiters(buf)
|
Converts path delimiters to standard for platform inplace in buffer(e.g. / to \ on windows, \ to / on posix), returns buf |
convertPathDelimiters(src)
|
Converts path delimiters to standard for platform (e.g. / to \ on windows, \ to / on posix) |
exeFilename()
|
Returns current executable path and file name |
exePath()
|
Returns current executable path only, including last path delimiter - removes executable name from result of std.file.thisExePath() |
filterFilename(filename, pattern)
|
Check filename with pattern |
filterFilename(filename, filters)
|
Filters file name by pattern list |
findExecutablePath(executableName)
|
For executable name w/o path, find absolute path to executable |
getBookmarkPaths()
|
Returns array of user bookmarked directories |
getRootPaths()
|
Returns array of system root entries |
homeEntry()
|
Returns user's home directory entry |
homePath()
|
Returns user's home directory |
isHidden(path)
|
Check if path is hidden |
isPathDelimiter(ch)
|
Returns true if char ch is / or \ slash |
isRoot(path)
|
Returns true if directory is root directory (e.g. / or C:\) |
listDirectory(dir, attrFilter, filters)
|
List directory content. |
parentDir(path)
|
Returns parent directory for specified path |
toAbsolutePath(pathName)
|
If pathName is not absolute path, convert it to absolute (assuming it is relative to current directory) |
Structs
Name | Description |
---|---|
FileMonitor
|
|
RootEntry
|
Filesystem root entry item |
Enums
Name | Description |
---|---|
AttrFilter
|
|
RootEntryType
|
Filesystem root entry / bookmark types |
Manifest constants
Name | Type | Description |
---|---|---|
PATH_DELIMITER
|
Path delimiter (\ for windows, / for others) |
Aliases
Name | Type | Description |
---|---|---|
currentDir
|
std
|
Returns current directory |