Changelog¶
v0.7.1 (2018-10-13)¶
- Replace usage of
distutils.dir_util.mkpathwithos.path.makedirs.
v0.7.0 (2016-04-19)¶
- Use
shutil.moveinstead ofshutil.copyto move temporary file created duringputoperation toHashFSdirectory.
v0.6.0 (2015-10-19)¶
- Add faster
scandirpackage for iterating over files/folders when platform is Python < 3.5. Scandir implementation was added toosmodule starting with Python 3.5.
v0.5.0 (2015-07-02)¶
- Rename private method
HashFS.copytoHashFS._copy. - Add
is_duplicateattribute toHashAddress. - Make
HashFS.put()returnHashAddresswithis_duplicate=Truewhen file with same hash already exists on disk.
v0.4.0 (2015-06-03)¶
- Add
HashFS.size()method that returns the size of all files in bytes. - Add
HashFS.count()/HashFS.__len__()methods that return the count of all files. - Add
HashFS.__iter__()method to support iteration. Proxies toHashFS.files(). - Add
HashFS.__contains__()method to supportinoperator. Proxies toHashFS.exists(). - Don’t create the root directory (if it doesn’t exist) until at least one file has been added.
- Fix
HashFS.repair()not usingextensionsargument properly.
v0.3.0 (2015-06-02)¶
- Rename
HashFS.lengthparameter/property towidth. (breaking change)
v0.2.0 (2015-05-29)¶
- Rename
HashFS.gettoHashFS.open. (breaking change) - Add
HashFS.get()method that returns aHashAddressorNonegiven a file ID or path.
v0.1.0 (2015-05-28)¶
- Add
HashFS.get()method that retrieves a reader object given a file ID or path. - Add
HashFS.delete()method that deletes a file ID or path. - Add
HashFS.folders()method that returns the folder paths that directly contain files (i.e. subpaths that only contain folders are ignored). - Add
HashFS.detokenize()method that returns the file ID contained in a file path. - Add
HashFS.repair()method that reindexes any files under root directory whose file path doesn’t not match its tokenized file ID. - Rename
Addressclasss toHashAddress. (breaking change) - Rename
HashAddress.digesttoHashAddress.id. (breaking change) - Rename
HashAddress.pathtoHashAddress.abspath. (breaking change) - Add
HashAddress.relpathwhich represents path relative toHashFS.root.
v0.0.1 (2015-05-27)¶
- First release.
- Add
HashFSclass. - Add
HashFS.put()method that saves a file path or file-like object by content hash. - Add
HashFS.files()method that returns all files under root directory. - Add
HashFS.exists()which checks either a file hash or file path for existence.