コード例 #1
0
ファイル: box.py プロジェクト: thouters/ltr
 def getNode(self,fullvolpath):
     fname = fullvolpath.split("/")[-1]
     dirpath = fullvolpath[0:-len(fname)].rstrip("/") # trailing /
     if dirpath=="":
         dirpath = "/"
     nodes = list(LtrNode.view(self.space.records,"ltrcrawler/path",key=[dirpath,fname],include_docs=True))
     nodes = filter(lambda x: x.boxname == self.id ,nodes)
     if 0==len(nodes):
         return None
     node = nodes[0]
     node.connect(self.space)
     return node