1128 |
self.fsync(fp) |
self.fsync(fp) |
1129 |
if Globals.fsync_directories: self.get_parent_rp().fsync() |
if Globals.fsync_directories: self.get_parent_rp().fsync() |
1130 |
|
|
|
def sync_delete(self): |
|
|
"""Delete self with sync to guarantee completion |
|
|
|
|
|
On some filesystems (like linux's ext2), we must sync both the |
|
|
file and the directory to make sure. |
|
|
|
|
|
""" |
|
|
if self.lstat() and not self.issym(): self.fsync_local(self.delete) |
|
|
if Globals.fsync_directories: self.get_parent_rp().fsync() |
|
|
|
|
1131 |
def get_data(self): |
def get_data(self): |
1132 |
"""Open file as a regular file, read data, close, return data""" |
"""Open file as a regular file, read data, close, return data""" |
1133 |
fp = self.open("rb") |
fp = self.open("rb") |