Install filelibrary package
You're done! Now all there is to do is read the documentation.
Load Package
from filelibrary import filelibrary
fileLibrary = filelibrary ("path" )
Get files in path
files = fileLibrary .getFileList ()
print (files ) # prints every files in the specified path
Get directories in path
dirs = fileLibrary .getDirList ()
print (dirs ) # prints every directories in the specified path
Print all (prints files and directories)
Read file
fileLibrary .openFile ("fileName.extension" )
# fileLibrary.openFile("test.txt")
Write file
fileLibrary .writeFile ("fileName.extension" , "just a text here" )
# fileLibrary.writeFile("test.txt", "just a text here")
Read file as JSON
fileLibrary .openFileAsJson ("fileName.extension" )
# fileLibrary.openFileAsJson("test.json")
Write file as JSON
fileLibrary .writeFileAsJson ("fileName.extension" , {"data" : "here" })
# fileLibrary.writeFileAsJson("test.json", {"name": "John", "age": "30"})
Congratulations! You've finished the documentation. Explore the package and create awesome projects!