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.0.tar.gz
(11.6 kB
view hashes)
Built Distribution
Close
Hashes for generalfile-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ffe2cd63893ed0c88d339278da82fedd6fc3ee7899f5442cfe4b06f8504f700 |
|
MD5 | 4b387d8baf87728f85f0eee30963245f |
|
BLAKE2b-256 | 0d53809dd9ed72eafc243d7edbd5376a51058e9d3acb374f614d7fa06193783f |