This module is designed to relief and simplify interaction of your python modules with the file system.
Project description
fs-manager
Description
This module is designed to relief and simplify interaction of your python modules with the file system.
Installation
python setup.py install
or
pip install -e .
or
pip install fs-manager
How to use
For example, you can inherit your class from FSManager class
from fs_manager import FSManager class Foo(FSManager, ...): FSManager.__init__(self, base_path="/some/base", mode=0o744, temporary=True, rand_prefix=True) ...
Or you can just use it as an object
from fs_manager import FSManager with FSManager(base_path="/tmp/base", mode=0o744, temporary=True, rand_prefix=True) as fsm: fsm.mkdir(alias="tom", path="tom_dir", mode=0o744, temporary=True) fsm.cd("tom") fsm.mkdir("tom_dir") fsm.mkfile("jerry", "jerry_file", 0o644, True) fsm.ls() fsm.back() fsm.ls() fsm.rm("tom")
There is much more inside :)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fs-manager-0.0.2.tar.gz
(13.2 kB
view hashes)