dlangui.core.files

This module contains cross-platform file access utilities

More...

Members

Aliases

currentDir
alias currentDir = std.file.getcwd

Returns current directory

Enums

AttrFilter
enum AttrFilter
Undocumented in source.
RootEntryType
enum RootEntryType

Filesystem root entry / bookmark types

Functions

appDataPath
string appDataPath(string subdir)

Returns application data directory

appendPath
string appendPath(string[] pathItems)

Appends file path parts with proper delimiters e.g. appendPath("/home/user", ".myapp", "config") => "/home/user/.myapp/config"

appendPath
char[] appendPath(char[] buf, string[] 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
char[] convertPathDelimiters(char[] buf)

Converts path delimiters to standard for platform inplace in buffer(e.g. / to \ on windows, \ to / on posix), returns buf

convertPathDelimiters
string convertPathDelimiters(string src)

Converts path delimiters to standard for platform (e.g. / to \ on windows, \ to / on posix)

filterFilename
bool filterFilename(string filename, string pattern)

check filename with pattern

filterFilename
bool filterFilename(string filename, string[] filters)

Filters file name by pattern list

findExecutablePath
string findExecutablePath(string executableName)

for executable name w/o path, find absolute path to executable

getBookmarkPaths
RootEntry[] getBookmarkPaths()

returns array of user bookmarked directories

isHidden
bool isHidden(string path)

Check if path is hidden.

isPathDelimiter
bool isPathDelimiter(char ch)

Returns true if char ch is / or \ slash

isRoot
bool isRoot(string path)

returns true if directory is root directory (e.g. / or C:\)

listDirectory
DirEntry[] listDirectory(string dir, AttrFilter attrFilter, string[] filters)

List directory content

listDirectory
deprecated bool listDirectory(string dir, bool includeDirs, bool includeFiles, bool showHiddenFiles, string[] filters, DirEntry[] entries, bool showExecutables)

List directory content

parentDir
string parentDir(string path)

returns parent directory for specified path

splitPath
deprecated string[] splitPath(string path)
toAbsolutePath
string toAbsolutePath(string pathName)

if pathName is not absolute path, convert it to absolute (assuming it is relative to current directory)

Properties

exeFilename
string exeFilename [@property getter]

Returns current executable path and file name

exePath
string exePath [@property getter]

Returns current executable path only, including last path delimiter - removes executable name from result of std.file.thisExePath()

getRootPaths
RootEntry[] getRootPaths [@property getter]

returns array of system root entries

homeEntry
RootEntry homeEntry [@property getter]

Returns user's home directory entry

homePath
string homePath [@property getter]

Returns user's home directory

Structs

RootEntry
struct RootEntry

Filesystem root entry item

Variables

PATH_DELIMITER
enum char PATH_DELIMITER;

path delimiter (\ for windows, / for others)

Detailed Description

Synopsis:

import dlangui.core.files;

Meta

License

Boost License 1.0

Authors

Vadim Lopatin, coolreader.org@gmail.com