Easily manage files cross platform.
Project description
Package: generalfile
File manager for intuitive cross-platform compatability with gathered useful functionality. Generalfile operates on the middle ground of all relevant operating systems. E.g. Windows being case insensitive -> Don't allow paths with same name but differeing case. Uses a race condition safe lock mechanism for all file operations.
Installation
pip install generalfile
Usage example
from generalfile import Path
Path("newfolder/test.txt").write("foobar") # Automatically creates new folder
assert Path("newfolder/test.txt").read() == "foobar"
Path("newfolder").delete() # Delete entire folder
with Path("foo/bar.txt").lock(): # Recursively lock a file or even a folder which doesn't have to exist.
pass # The lock is created in a seperate folder, so you're free to do whatever you want in here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
generalfile-2.0.1.tar.gz
(11.5 kB
view hashes)
Built Distribution
Close
Hashes for generalfile-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8181bc2916a00d830ad515192b8215e6f7d64a01e307b649f37dffb8f5299dbb |
|
MD5 | 4e50b9043c55ed56f94a4f1083f045ff |
|
BLAKE2b-256 | 226112d2187ceacc3c31bb68de75bf4ae2c9c72541c9995f5b6d287fc9ff905b |