summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/rpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index ec513fd..0f3ddc1 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -828,6 +828,14 @@ class RPath(RORPath):
raise RPathException("Error closing file")
self.setdata()
+ def write_string(self, s, compress = None):
+ """Write string s into rpath"""
+ assert not self.lstat(), "File %s already exists" % (self.path,)
+ outfp = self.open("wb", compress = compress)
+ outfp.write(s)
+ assert not outfp.close()
+ self.setdata()
+
def isincfile(self):
"""Return true if path looks like an increment file