From b0de01cf0102ec596c2bdec553eb73713e9da103 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 9 Apr 2011 14:26:41 -0500 Subject: [PATCH] More documentation on all the core storage API methods --- mediagoblin/storage.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mediagoblin/storage.py b/mediagoblin/storage.py index 8e62a3a6..4e0960c7 100644 --- a/mediagoblin/storage.py +++ b/mediagoblin/storage.py @@ -84,11 +84,22 @@ class StorageInterface(object): # Subclasses should override this method. self.__raise_not_implemented() - def get_file(self, filepath): + def get_file(self, filepath, mode): + """ + Return a file-like object for reading/writing from this filepath. + + Should create directories, buckets, whatever, as necessary. + """ # Subclasses should override this method. self.__raise_not_implemented() def delete_file(self, filepath): + """ + Delete or dereference the file at filepath. + + This might need to delete directories, buckets, whatever, for + cleanliness. (Be sure to avoid race conditions on that though) + """ # Subclasses should override this method. self.__raise_not_implemented() -- 2.25.1