Implement truncate, utimens and use pathlib to handle paths

This commit is contained in:
2017-10-09 22:27:52 -06:00
parent 4d8c20e274
commit 2a2e608bde
2 changed files with 34 additions and 36 deletions
+6 -1
View File
@@ -60,6 +60,11 @@ class ItemManager:
uuid=item['uuid'])
return notes
def touchNote(self, uuid):
item = self.items[uuid]
item['dirty'] = True
self.syncItems()
def writeNote(self, uuid, text):
item = self.items[uuid]
item['content']['text'] = text.strip()
@@ -77,7 +82,7 @@ class ItemManager:
updated_at=time,
enc_item_key='',
content=content)
return 0
self.syncItems()
def deleteNote(self, uuid):
item = self.items[uuid]