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

Class Entry

source code

object --+        
         |        
      Node --+    
             |    
          Base --+
                 |
                Entry

This is the class for generic Node.FS entries--that is, things that could be a File or a Dir, but we're just not sure yet. Consequently, the methods in this class really exist just to transform their associated object into the right class when the time comes, and then call the same-named method in the transformed class.
Nested Classes [hide private]

Inherited from Node: Attrs, BuildInfo, NodeInfo

Instance Methods [hide private]
 
__init__(self, name, directory, fs)
Initialize a generic Node.FS.Base object.
source code
 
diskcheck_match(self) source code
 
disambiguate(self, must_exist=None) source code
 
rfile(self)
We're a generic Entry, but the caller is actually looking for a File at this point, so morph into one.
source code
 
scanner_key(self) source code
 
get_contents(self)
Fetch the contents of the entry. Returns the exact binary contents of the file.
source code
 
get_text_contents(self)
Fetch the decoded text contents of a Unicode encoded Entry.
source code
 
must_be_same(self, klass)
Called to make sure a Node is a Dir. Since we're an Entry, we can morph into one.
source code
 
exists(self)
Does this node exists?
source code
 
rel_path(self, other) source code
 
new_ninfo(self) source code
 
_glob1(self, pattern, ondisk=True, source=False, strings=False) source code
 
get_subst_proxy(self)
This method is expected to return an object that will function exactly like this Node, except that it implements any additional special features that we would like to be in effect for Environment variable substitution. The principle use is that some Nodes would like to implement a __getattr__() method, but putting that in the Node type itself has a tendency to kill performance. We instead put it in a proxy and return it from this method. It is legal for this method to return self if no new functionality is needed for Environment substitution.
source code

Inherited from Base: RDirs, Rfindalldirs, __getattr__, __str__, for_signature, get_abspath, get_dir, get_internal_path, get_labspath, get_path, get_path_elements, get_suffix, get_tpath, getmtime, getsize, is_under, isdir, isfile, islink, rentry, rexists, rstr, set_local, set_src_builder, src_builder, srcnode, 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, alter_targets, build, builder_set, built, changed, children, children_are_up_to_date, clear, clear_memoized_values, del_binfo, env_set, executor_cleanup, explain, get_binfo, get_build_env, get_build_scanner_path, get_builder, get_cachedir_csig, get_csig, get_env, get_env_scanner, get_executor, get_found_includes, get_implicit_deps, get_ninfo, get_source_scanner, get_state, get_stored_implicit, get_stored_info, get_string, get_target_scanner, has_builder, has_explicit_builder, is_derived, is_literal, is_up_to_date, make_ready, missing, multiple_side_effect_has_builder, new_binfo, postprocess, prepare, 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 object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Instance Variables [hide private]

Inherited from Base: fs, name

Properties [hide private]
  _sconsign
  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 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, name, directory, 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)

disambiguate(self, must_exist=None)

source code 
Overrides: Node.disambiguate

rfile(self)

source code 
We're a generic Entry, but the caller is actually looking for a File at this point, so morph into one.
Overrides: Base.rfile

scanner_key(self)

source code 
Overrides: Node.scanner_key

get_contents(self)

source code 
Fetch the contents of the entry. Returns the exact binary contents of the file.
Overrides: Node.get_contents

get_text_contents(self)

source code 

Fetch the decoded text contents of a Unicode encoded Entry.

Since this should return the text contents from the file system, we check to see into what sort of subclass we should morph this Entry.

must_be_same(self, klass)

source code 
Called to make sure a Node is a Dir. Since we're an Entry, we can morph into one.
Overrides: Base.must_be_same

exists(self)

source code 
Does this node exists?
Overrides: Node.exists
(inherited documentation)

new_ninfo(self)

source code 
Overrides: Node.new_ninfo

_glob1(self, pattern, ondisk=True, source=False, strings=False)

source code 
Overrides: Base._glob1

get_subst_proxy(self)

source code 
This method is expected to return an object that will function exactly like this Node, except that it implements any additional special features that we would like to be in effect for Environment variable substitution. The principle use is that some Nodes would like to implement a __getattr__() method, but putting that in the Node type itself has a tendency to kill performance. We instead put it in a proxy and return it from this method. It is legal for this method to return self if no new functionality is needed for Environment substitution.
Overrides: Node.get_subst_proxy
(inherited documentation)