License:
BSD style: see license.txt

Version:
Mar 2004: Initial release

Version:
Feb 2007: Now using mutating paths

author:
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.

  • static FilePath toAbsolute (FilePath target, char[] prefix = null);
  • Convert the provided path to an absolute path, using the current working directory where prefix is not provided. If the given path is already an absolute path, return it intact.

    Returns the provided path, adjusted as necessary



  • static char[] toAbsolute (char[] path, char[] prefix = null);
  • Convert the provided path to an absolute path, using the current working directory where prefix is not provided. If the given path is already an absolute path, return it intact.

    Returns the provided path, adjusted as necessary



  • static bool equals (char[] path1, char[] path2, char[] prefix = null);
  • Compare to paths for absolute equality. The given prefix is prepended to the paths where they are not already in absolute format (start with a '/'). Where prefix is not provided, the current working directory will be used

    Returns true if the paths are equivalent, false otherwise



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

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

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

    Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc