filelibrary-0.0.2
توضیحات
filelibrary is a simple package that allows you to get and edit files or directories in a specified path.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | filelibrary-0.0.2 |
| نام | filelibrary |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | CantCode |
| ایمیل نویسنده | cantcode023@gmail.com |
| آدرس صفحه اصلی | https://github.com/CantCode023/filesystem |
| آدرس اینترنتی | https://pypi.org/project/filelibrary/ |
| مجوز | - |
# How to use filelibrary
1. Install filelibrary package
```bash
pip install filelibrary
```
2. You're done! Now all there is to do is read the documentation.
# Documentation
1. Load Package
```python
from filelibrary import filelibrary
fileLibrary = filelibrary("path")
```
2. Get files in path
```python
files = fileLibrary.getFileList()
print(files) # prints every files in the specified path
```
3. Get directories in path
```python
dirs = fileLibrary.getDirList()
print(dirs) # prints every directories in the specified path
```
4. Print all (prints files and directories)
```python
fileLibrary.printAll()
```
5. Read file
```python
fileLibrary.openFile("fileName.extension")
# fileLibrary.openFile("test.txt")
```
6. Write file
```python
fileLibrary.writeFile("fileName.extension", "just a text here")
# fileLibrary.writeFile("test.txt", "just a text here")
```
7. Read file as JSON
```python
fileLibrary.openFileAsJson("fileName.extension")
# fileLibrary.openFileAsJson("test.json")
```
8. Write file as JSON
```python
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!
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl filelibrary-0.0.2:
pip install filelibrary-0.0.2.whl
نصب پکیج tar.gz filelibrary-0.0.2:
pip install filelibrary-0.0.2.tar.gz