Skip to content

jameskabbes/dir_ops

Repository files navigation

dir_ops

Handy directory operations along with homemade Dir/Path classes

Documentation
PyPI


Installation

pip install kabbes_dir_ops


Usage

For more in-depth documentation, read the information provided on the Pages. Or better yet, read the source code.

import dir_ops as do
do.join( 'C', 'Path', 'To', 'File' )
>>> 'C:/Path/To/File'
do.path_to_dirs( 'C:/Path/To/File/asdf.txt' )
>>> [ 'C', 'Path', 'To', 'File', 'asdf.txt' ]
Path_inst = do.Path( 'C:/Path/To/File/asdf.txt')
print( Path_inst.exists() )
>>> True
Path_inst.print_atts() #from parent_class dependency
>>>
---Path Class---
path:	C:/Path/To/File/asdf.txt
dirs:	['C:', 'Path', 'To', 'File', 'asdf.txt']
ending:	txt
size:	None

Author

James Kabbes

Releases

No releases published

Packages

No packages published

Languages