SCons.Node.FS.FS

Package SCons :: Package Node :: Module FS :: Class FS |
[hide private]
[frames] | no frames]

# Class FS

source code

    LocalFS --+
              |
             FS

Instance Methods | [hide private]
__init__(self, path=False) Initialize the Node.FS subsystem. | source code
set_SConstruct_dir(self, dir) | source code
get_max_drift(self) | source code
set_max_drift(self, max_drift) | source code
getcwd(self) | source code
chdir(self, dir, change_os_dir=0) Change the current working directory for lookups. | source code
get_root(self, drive) Returns the root directory for the specified drive, creating it if necessary. | source code
_lookup(self, p, directory, fsclass, create=False) The generic entry point for Node lookup with user-supplied data. | source code
Entry(self, name, directory=False, create=False) Lookup or create a generic Entry node with the specified name. | source code
File(self, name, directory=False, create=False) Lookup or create a File node with the specified name. | source code
Dir(self, name, directory=False, create=True) Lookup or create a Dir node with the specified name. | source code
VariantDir(self, variant_dir, src_dir, duplicate=False) Link the supplied variant directory to the source directory for purposes of building files. | source code
Repository(self, *dirs) Specify Repository directories to search. | source code
variant_dir_target_climb(self, orig, dir, tail) Create targets in corresponding variant directories | source code
Glob(self, pathname, ondisk=True, source=True, strings=False, cwd=False) Globs | source code
Inherited from `LocalFS`: `chmod`, `copy`, `copy2`, `exists`, `getmtime`, `getsize`, `isdir`, `isfile`, `islink`, `link`, `listdir`, `lstat`, `makedirs`, `mkdir`, `open`, `readlink`, `rename`, `stat`, `symlink`, `unlink`

Class Variables | [hide private]
| memoizer_counters = ``[``]``
Inherited from `LocalFS`: `__metaclass__`

Method Details | [hide private]

### __init__(self, path=False) (Constructor) | source code
Initialize the Node.FS subsystem. The supplied path is the top of the source tree, where we expect to find the top-level build file. If no path is supplied, the current directory is the default. The path argument must be a valid absolute path.

### chdir(self, dir, change_os_dir=0) | source code
Change the current working directory for lookups. If change_os_dir is true, we will also change the "real" cwd to match.

### _lookup(self, p, directory, fsclass, create=False) | source code
The generic entry point for Node lookup with user-supplied data. This translates arbitrary input into a canonical Node.FS object of the specified fsclass. The general approach for strings is to turn it into a fully normalized absolute path and then call the root directory's lookup_abs() method for the heavy lifting. If the path name begins with '#', it is unconditionally interpreted relative to the top-level directory of this FS. '#' is treated as a synonym for the top-level SConstruct directory, much like '~' is treated as a synonym for the user's home directory in a UNIX shell. So both '#foo' and '#/foo' refer to the 'foo' subdirectory underneath the top-level SConstruct directory. If the path name is relative, then the path is looked up relative to the specified directory, or the current directory (self._cwd, typically the SConscript directory) if the specified directory is None.

### Entry(self, name, directory=False, create=False) | source code
Lookup or create a generic Entry node with the specified name. If the name is a relative path (begins with ./, ../, or a file name), then it is looked up relative to the supplied directory node, or to the top level directory of the FS (supplied at construction time) if no directory is supplied.

### File(self, name, directory=False, create=False) | source code
Lookup or create a File node with the specified name. If the name is a relative path (begins with ./, ../, or a file name), then it is looked up relative to the supplied directory node, or to the top level directory of the FS (supplied at construction time) if no directory is supplied. This method will raise TypeError if a directory is found at the specified path.

### Dir(self, name, directory=False, create=True) | source code
Lookup or create a Dir node with the specified name. If the name is a relative path (begins with ./, ../, or a file name), then it is looked up relative to the supplied directory node, or to the top level directory of the FS (supplied at construction time) if no directory is supplied. This method will raise TypeError if a normal file is found at the specified path.

### variant_dir_target_climb(self, orig, dir, tail) | source code
Create targets in corresponding variant directories Climb the directory tree, and look up path names relative to any linked variant directories we find. Even though this loops and walks up the tree, we don't memoize the return value because this is really only used to process the command-line targets.

### Glob(self, pathname, ondisk=True, source=True, strings=False, cwd=False) | source code
Globs This is mainly a shim layer