From 6ad2fa1336c493903db3ec1757184beb58512a00 Mon Sep 17 00:00:00 2001 From: willmcgugan Date: Thu, 7 Jan 2010 21:59:33 +0000 Subject: A few tweaks and fixes git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@317 67cdc799-7952-0410-af00-57a81ceafa0f --- fs/memoryfs.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'fs/memoryfs.py') diff --git a/fs/memoryfs.py b/fs/memoryfs.py index eb18020..0366310 100644 --- a/fs/memoryfs.py +++ b/fs/memoryfs.py @@ -169,11 +169,11 @@ class DirEntry(object): class MemoryFS(FS): - + """ An in-memory filesystem. - + MemoryFS objects are very fast, but non-permantent. They are useful for creating a directory structure prior to writing it somewhere permanent. - + """ def _make_dir_entry(self, *args, **kwargs): @@ -181,6 +181,7 @@ class MemoryFS(FS): def __init__(self, file_factory=None): super(MemoryFS, self).__init__(thread_synchronize=_thread_synchronize_default) + self.dir_entry_factory = DirEntry self.file_factory = file_factory or MemoryFile @@ -235,7 +236,7 @@ class MemoryFS(FS): @synchronize def makedir(self, dirname, recursive=False, allow_recreate=False): - if not dirname: + if not dirname: raise PathError(dirname) fullpath = dirname dirpath, dirname = pathsplit(dirname) @@ -463,5 +464,3 @@ class MemoryFS(FS): info['size'] = len(dir_entry.data or '') return info - - -- cgit v1.2.1