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

Class DirFile

source code

object --+        
         |        
      Base --+    
             |    
           Dir --+
                 |
                DirFile


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



Instance Methods [hide private]
 
__init__(self, dir)
dir - the directory for the file
source code
 
write(self, sync=1)
Write the .sconsign file to disk.
source code

Inherited from Base: do_not_set_entry, do_not_store_info, get_entry, merge, set_entry, store_info

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, dir)
(Constructor)

source code 

dir - the directory for the file

Overrides: Dir.__init__

write(self, sync=1)

source code 

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.