def _reinit_(self): self.bucketContent = [] self.root_dir= Util.my_dir( s3key=u'', name=u'',depth=0) self.dir_stack = [] self.dir_stack.append(self.root_dir) self.count = 0 self.keyName = ''
def _reinit_(self): self.bucketContent = [] self.root_dir = Util.my_dir(s3key=u"", name=u"", depth=0) self.dir_stack = [] self.dir_stack.append(self.root_dir) self.count = 0 self.keyName = ""
j = full_name.rfind(Util.DELIMITER) file_name = full_name[j+1:] f = Util.my_file( fileEntry.key, file_name, topdir.depth+1, fileEntry.size, \ fileEntry.owner.display_name, fileEntry.last_modified, fileEntry.etag, prefixDir ) topdir.add_child ( f ) self.count = self.count + 1 for dirEntry in dirContents.common_prefixes: full_name = dirEntry.prefix[:-1] j = full_name.rfind(Util.DELIMITER) dir_name = full_name[j+1:] d = Util.my_dir ( full_name, dir_name, topdir.depth+1, prefixDir) topdir.add_child ( d ) self.count = self.count + 1 for dirEntry in dirContents.common_prefixes: full_name = dirEntry.prefix[:-1] j = full_name.rfind(Util.DELIMITER) dir_name = full_name[j+1:] d = topdir.get_child( dir_name) if not d: raise Failed() self.dir_stack.append(d) self.get_keys_in_bucket_as_fstree( dirEntry.prefix, delimiter )
fileEntry.owner.display_name, fileEntry.last_modified, fileEntry.etag, prefixDir, ) topdir.add_child(f) self.count = self.count + 1 for dirEntry in dirContents.common_prefixes: full_name = dirEntry.prefix[:-1] j = full_name.rfind(Util.DELIMITER) dir_name = full_name[j + 1 :] d = Util.my_dir(full_name, dir_name, topdir.depth + 1, prefixDir) topdir.add_child(d) self.count = self.count + 1 for dirEntry in dirContents.common_prefixes: full_name = dirEntry.prefix[:-1] j = full_name.rfind(Util.DELIMITER) dir_name = full_name[j + 1 :] d = topdir.get_child(dir_name) if not d: raise Failed() self.dir_stack.append(d) self.get_keys_in_bucket_as_fstree(dirEntry.prefix, delimiter)