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

Class RootDir

source code

object --+            
         |            
      Node --+        
             |        
          Base --+    
                 |    
               Dir --+
                     |
                    RootDir

A class for the root directory of a file system.

This is the same as a Dir class, except that the path separator ('/' or '') is actually part of the name, so we don't need to add a separator when creating the path names of entries within this directory.

Nested Classes [hide private]

Inherited from Dir: BuildInfo, NodeInfo

Inherited from Node: Attrs

Instance Methods [hide private]
 
__init__(self, drive, fs)
Initialize a generic Node.FS.Base object.
source code
 
_morph(self)
Turn a file system Node (either a freshly initialized directory object or a separate Entry object) into a proper directory object.
source code
 
must_be_same(self, klass)
This node, which already existed, is being looked up as the specified klass. Raise an exception if it isn't.
source code
 
_lookup_abs(self, p, klass, create=1)
Fast (?) lookup of a normalized absolute path.
source code
 
__str__(self)
A Node.FS.Base object's string representation is its path name.
source code
 
entry_abspath(self, name) source code
 
entry_labspath(self, name) source code
 
entry_path(self, name) source code
 
entry_tpath(self, name) source code
 
is_under(self, dir) source code
 
up(self) source code
 
get_dir(self) source code
 
src_builder(self)
Fetch the source code builder for this node.
source code

Inherited from Dir: Dir, Entry, File, addRepository, alter_targets, build, dir_on_disk, diskcheck_match, do_duplicate, entry_exists_on_disk, file_on_disk, getRepositories, get_abspath, get_all_rdirs, get_contents, get_csig, get_env_scanner, get_found_includes, get_internal_path, get_labspath, get_path_elements, get_target_scanner, get_text_contents, get_timestamp, get_tpath, glob, is_up_to_date, link, multiple_side_effect_has_builder, prepare, rdir, rel_path, rentry_exists_on_disk, scanner_key, sconsign, srcdir_duplicate, srcdir_find_file, srcdir_list, srcnode, walk

Inherited from Dir (private): _create, _glob1, _rel_path_key, _srcdir_find_file_key

Inherited from Base: RDirs, Rfindalldirs, __getattr__, exists, for_signature, get_path, get_subst_proxy, get_suffix, getmtime, getsize, isdir, isfile, islink, rentry, rexists, rfile, rstr, set_local, set_src_builder, stat, str_for_display, target_from_source

Inherited from Base (private): _Rfindalldirs_key, _get_str, _save_str

Inherited from Node: Decider, GetTag, Tag, add_dependency, add_ignore, add_prerequisite, add_source, add_to_implicit, add_to_waiting_parents, add_to_waiting_s_e, add_wkid, all_children, builder_set, built, changed, children, children_are_up_to_date, clear, clear_memoized_values, del_binfo, disambiguate, env_set, executor_cleanup, explain, get_binfo, get_build_env, get_build_scanner_path, get_builder, get_cachedir_csig, get_env, get_executor, get_implicit_deps, get_ninfo, get_source_scanner, get_state, get_stored_implicit, get_stored_info, get_string, has_builder, has_explicit_builder, is_derived, is_literal, make_ready, missing, new_binfo, new_ninfo, postprocess, push_to_cache, release_target_info, remove, render_include_tree, reset_executor, retrieve_from_cache, scan, select_scanner, set_always_build, set_executor, set_explicit, set_nocache, set_noclean, set_precious, set_pseudo, set_specific_source, set_state, visited

Inherited from Node (private): _add_child, _children_get, _children_reset

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Instance Variables [hide private]
  name
Filename with extension as it was specified when the object was created; to obtain filesystem path, use Python str() function
  fs
Reference to parent Node.FS object
Properties [hide private]
  _lookupDict

Inherited from Dir: cachedir_csig, cachesig, contentsig, dirname, entries, on_disk_entries, rcs_dir, released_target_info, repositories, root, scanner_paths, sccs_dir, searched, srcdir, variant_dirs

Inherited from Dir (private): _sconsign

Inherited from Base: cwd, dir, duplicate, sbuilder

Inherited from Node: always_build, attributes, binfo, builder, cached, changed_since_last_build, depends, depends_set, env, executor, ignore, ignore_set, implicit, implicit_set, includes, is_explicit, linked, ninfo, nocache, noclean, precious, prerequisites, pseudo, ref_count, side_effect, side_effects, sources, sources_set, state, store_info, waiting_parents, waiting_s_e, wkids

Inherited from object: __class__

Method Details [hide private]

__init__(self, drive, fs)
(Constructor)

source code 

Initialize a generic Node.FS.Base object.

Call the superclass initialization, take care of setting up our relative and absolute paths, identify our parent directory, and indicate that this node should use signatures.

Overrides: object.__init__
(inherited documentation)

_morph(self)

source code 

Turn a file system Node (either a freshly initialized directory object or a separate Entry object) into a proper directory object.

Set up this directory's entries and hook it into the file system tree. Specify that directories (this Node) don't use signatures for calculating whether they're current.

Overrides: Dir._morph

must_be_same(self, klass)

source code 
This node, which already existed, is being looked up as the specified klass. Raise an exception if it isn't.
Overrides: Base.must_be_same
(inherited documentation)

_lookup_abs(self, p, klass, create=1)

source code 

Fast (?) lookup of a normalized absolute path.

This method is intended for use by internal lookups with already-normalized path data. For general-purpose lookups, use the FS.Entry(), FS.Dir() or FS.File() methods.

The caller is responsible for making sure we're passed a normalized absolute path; we merely let Python's dictionary look up and return the One True Node.FS object for the path.

If a Node for the specified "p" doesn't already exist, and "create" is specified, the Node may be created after recursive invocation to find or create the parent directory or directories.

__str__(self)
(Informal representation operator)

source code 
A Node.FS.Base object's string representation is its path name.
Overrides: object.__str__
(inherited documentation)

entry_abspath(self, name)

source code 
Overrides: Dir.entry_abspath

entry_labspath(self, name)

source code 
Overrides: Dir.entry_labspath

entry_path(self, name)

source code 
Overrides: Dir.entry_path

entry_tpath(self, name)

source code 
Overrides: Dir.entry_tpath

is_under(self, dir)

source code 
Overrides: Base.is_under

up(self)

source code 
Overrides: Dir.up

get_dir(self)

source code 
Overrides: Base.get_dir

src_builder(self)

source code 

Fetch the source code builder for this node.

If there isn't one, we cache the source code builder specified for the directory (which in turn will cache the value from its parent directory, and so on up to the file system root).

Overrides: Base.src_builder
(inherited documentation)