tango.io.FileSystem

License:


BSD:
AFL 3.0:

Version:
Mar 2004: Initial release

Version:
Feb 2007: Now using mutating paths

Authors:
Kris, Chris Sauls (Win95 file support)

struct FileSystem;
Models an OS-specific file-system. Included here are methods to manipulate the current working directory, and to convert a path to its absolute form.

deprecated static void setDirectory(const(char)[] path);
Set the current working directory

Deprecated:
see Environment.cwd()

deprecated static char[] getDirectory();
Return the current working directory

Deprecated:
see Environment.cwd()

static @property char[][] roots();
List the set of root devices.

static long freeSpace(const(char)[] folder, bool superuser = false);
Request how much free space in bytes is available on the disk/mountpoint where folder resides.

If a quota limit exists for this area, that will be taken into account unless superuser is set to true.

If a user has exceeded the quota, a negative number can be returned.

Note that the difference between total available space and free space will not equal the combined size of the contents on the file system, since the numbers for the functions here are calculated from the used blocks, including those spent on metadata and file nodes.

If actual used space is wanted one should use the statistics functionality of tango.io.vfs.

See also: totalSpace()

Since:
0.99.9

static long totalSpace(const(char)[] folder, bool superuser = false);
Request how large in bytes the disk/mountpoint where folder resides is.

If a quota limit exists for this area, then that quota can be what will be returned unless superuser is set to true. On Posix systems this distinction is not made though.

NOTE Access to this information when superuser is set to true may only be available if the program is run in superuser mode.

See also: freeSpace()

Since:
0.99.9


Page generated by Ddoc. Copyright (c) 2004 Kris Bell. All rights reserved