Package SCons :: Module SConsign :: Class DirFile
[show private | hide private]
[frames | no frames]

Class DirFile

Base --+    
       |    
     Dir --+
           |
          DirFile


Encapsulates reading and writing a per-directory .sconsign file.


Method Summary
  __init__(self, dir)
dir - the directory for the file
  write(self, sync)
Write the .sconsign file to disk.
    Inherited from Base
  do_not_set_entry(self, filename, obj)
  do_not_store_info(self, filename, node)
  get_entry(self, filename)
Fetch the specified entry attribute.
  merge(self)
  set_entry(self, filename, obj)
Set the entry.
  store_info(self, filename, node)

Method Details

__init__(self, dir)
(Constructor)

dir - the directory for the file

Overrides:
SCons.SConsign.Dir.__init__

write(self, sync=1)

Write the .sconsign file to disk.

Try to write to a temporary file first, and rename it if we succeed. If we can't write to the temporary file, it's probably because the directory isn't writable (and if so, how did we build anything in this directory, anyway?), so try to write directly to the .sconsign file as a backup. If we can't rename, try to copy the temporary contents back to the .sconsign file. Either way, always try to remove the temporary file at the end.


Generated by Epydoc 2.1 on Wed Dec 12 09:39:31 2007 http://epydoc.sf.net