MCPcopy Index your code
hub / github.com/algorithmiaio/algorithmia-python / getDir

Method getDir

Algorithmia/datadirectory.py:76–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 return self._get_directory_iterator(DataObjectType.directory)
75
76 def getDir(self):
77 directory = tempfile.mkdtemp()
78 for file in self.files():
79 correct_filename = file.getName()
80 correct_file_path = os.path.join(directory, correct_filename)
81 local_file = file.getFile(as_path=True)
82 os.rename(local_file, correct_file_path)
83 return directory
84
85 def list(self):
86 return self._get_directory_iterator()

Callers 1

get_filesMethod · 0.80

Calls 3

filesMethod · 0.95
getNameMethod · 0.45
getFileMethod · 0.45

Tested by 1

get_filesMethod · 0.64