File and path manager package
Project description
fileUts
Installation
pip install fileUts
Usages
isDir
from fileUts import isDir
add1 = "c:/mydir"
add2 = "c:/mydir/myfile.ext"
print(isDir(add1))
print(isDir(add2))
True
False
isFile
from fileUts import isFile
add1 = "c:/mydir"
add2 = "c:/mydir/myfile.ext"
print(isFile(add1))
print(isFile(add2))
False
True
fileExists
Raise: <InvalidFile>
from fileUts import fileExists
add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"
print(fileExists(add1))
print(fileExists(add2)) # raises a <InvalidFile>
True
dirExists
Raise: <InvalidDir>
from fileUts import dirExists
add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"
print(dirExists(add1)) # raises a <InvalidDir>
print(dirExists(add2))
True
getFileExtenssion
Raise: <InvalidFile>
from fileUts import getFileExtenssion
add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"
print(getFileExtenssion(add1))
print(getFileExtenssion(add2)) # raises a <InvalidFile>
'ext'
createDir
Raise: <InvalidDir>
from fileUts import createDir
add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"
print(createDir(add1)) # raises a <InvalidDir>
print(createDir(add2))
True
createDir
Raise: <InvalidDir>
from fileUts import createDir
add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir/mydir2/mydir3"
print(createDir(add1)) # raises a <InvalidDir>
print(createDir(add2))
True
moveFiles
Raise: <InvalidDir>
from fileUts import moveFiles
files = "c:/mydir/myfile.*"
to_addr = "c:/target_dir"
print(moveFiles(files,to_addr))
1
clearDir
Raise: <InvalidDir>
from fileUts import clearDir
add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"
clearDir(add1) # raises a <InvalidDir>
clearDir(add2)
renameFile
Raise: <InvalidDir>
from fileUts import renameFile
add1 = "c:/mydir/myfile.ext"
add2 = "c:/mydir"
renameFile(add1,'newname.ext')
renameFile(add2,,'newname.ext') # raises a <InvalidFile>
Change Log
0.0.1 (2022-10-30)
- First Release
0.0.2 (2022-10-30)
- Raise Fixed
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
fileUts-0.0.2.tar.gz
(4.0 kB
view hashes)