SCons.SConsign.DirFile

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

# Class DirFile

source code

    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=False) 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`

Method Details | [hide private]

### __init__(self, dir) (Constructor) | source code
dir - the directory for the file Overrides: Dir.__init__

### write(self, sync=False) | 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.