示例#1
0
    def __init__(self, notebook, path):
        '''Construct a memory store.
		Pass args needed for StoreClass init.
		'''
        StoreClass.__init__(self, notebook, path)
        self.format = get_format('wiki')  # TODO make configable
        self._nodetree = []
        self.readonly = False
示例#2
0
	def __init__(self, notebook, path):
		'''Construct a memory store.
		Pass args needed for StoreClass init.
		'''
		StoreClass.__init__(self, notebook, path)
		self.format = get_format('wiki') # TODO make configable
		self._nodetree = []
		self.readonly = False
示例#3
0
	def __init__(self, notebook, path, dir=None):
		'''Contruct a files store.

		Takes an optional 'dir' attribute.
		'''
		StoreClass.__init__(self, notebook, path)
		self.dir = dir
		assert self.store_has_dir()
		self.format = get_format('wiki') # TODO make configable
示例#4
0
    def __init__(self, notebook, path, dir=None):
        '''Constructor

		@param notebook: a L{Notebook} object
		@param path: a L{Path} object for the mount point within the notebook
		@keyword dir: a L{Dir} object

		When no dir is given and the notebook has a dir already
		the dir is derived based on the path parameter. In the easiest
		case when path is the root, the notebook dir is copied.
		'''
        StoreClass.__init__(self, notebook, path)
        self.dir = dir
        if not self.store_has_dir():
            raise AssertionError, 'File store needs directory'
            # not using assert here because it could be optimized away
        self.format = get_format('wiki')  # TODO make configurable
示例#5
0
	def get_attachments_dir(self, path):
		dir = StoreClass.get_attachments_dir(self, path)
		if not dir is None:
			dir = FilteredDir(dir)
			dir.ignore('*.txt') # FIXME hardcoded extendion
		return dir
示例#6
0
 def get_attachments_dir(self, path):
     dir = StoreClass.get_attachments_dir(self, path)
     if not dir is None:
         dir = FilteredDir(dir)
         dir.ignore('*.txt')  # FIXME hardcoded extension
     return dir