D
Language
Phobos
Comparisons
object
std
std.base64
std.boxer
std.compiler
std.conv
std.ctype
std.date
std.file
std.format
std.gc
std.intrinsic
std.math
std.md5
std.mmfile
std.openrj
std.outbuffer
std.path
std.process
std.random
std.recls
std.regexp
std.socket
std.socketstream
std.stdint
std.stdio
std.cstream
std.stream
std.string
std.system
std.thread
std.uri
std.utf
std.zip
std.zlib
std.windows
std.linux
std.c
std.c.stdio
std.c.windows
std.c.linux
|
std.path
- const char[] sep;
- Character used to separate directory names in a path.
- const char[] altsep;
- Alternate version of sep[], used in Windows.
- const char[] pathsep;
- Path separator string.
- const char[] linesep;
- String used to separate lines.
- const char[] curdir;
- String representing the current directory.
- const char[] pardir;
- String representing the parent directory.
- char[] getExt(char[] fullname)
- Get extension.
For example, "d:\path\foo.bat" returns "bat".
- char[] getBaseName(char[] fullname)
- Get base name.
For example, "d:\path\foo.bat" returns "foo.bat".
- char[] getDirName(char[] fullname)
- Get directory name.
For example, "d:\path\foo.bat" returns "d:\path".
- char[] getDrive(char[] fullname)
- Get drive.
For example, "d:\path\foo.bat" returns "d:".
Returns null string on systems without the concept of a drive.
- char[] defaultExt(char[] fullname, char[] ext)
- Put a default extension on fullname if it doesn't already
have an extension.
- char[] addExt(char[] fullname, char[] ext)
- Add file extension or replace existing extension.
- int isabs(char[] path)
- Determine if absolute path name.
- char[] join(char[] p1, char[] p2)
- Join two path components.
- int fncharmatch(dchar c1, dchar c2)
- Match file name characters.
Case sensitivity depends on the operating system.
- int fnmatch(char[] name, char[] pattern)
- Match filename strings with pattern[], using the following wildcards:
- * match 0 or more characters
- ? match any character
- [chars] match any character that appears between the []
- [!chars] match any character that does not appear between the [! ]
Matching is case sensitive on a file system that is case sensitive.
Returns:
- !=0 match
- 0 no match
|