Skip to content

Python project for simplify interaction of inherit python classes with the file system

License

Notifications You must be signed in to change notification settings

KernelPryanic/resource-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ResourceManager

Description

This module is designed to relief and simplify interaction of your python modules with the file system.

Installation

python setup.py install

How to use

For example, you can inherit your class from ResourceManager class

from resource_manager import ResourceManager

...

class Foo(ResourceManager, ...):
ResourceManager.__init__(self, base_path="/some/base", mode=0o744, temporary=True, rand_prefix=True)

...

Or you can just use it as an object

from resource_manager import ResourceManager

...

with ResourceManager(base_path="/some/base", mode=0o744, temporary=True, rand_prefix=True) as rm:

rm.mkdir("alias", "path", "mode", "is_temporary")

rm.cd("path")

rm.mkfile("alias", "file_name", "is_temporary")

rm.ls()

rm.back()

rm.ls()

rm.rm("alias")

There is much more inside :)

About

Python project for simplify interaction of inherit python classes with the file system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages