| Name | osManag JSON |
| Version |
0.1.1
JSON |
| download |
| home_page | https://github.com/ZOUITANE-Ahmed/osManag.git |
| Summary | The `osManag`(Operating System Management)library provides a set of utility functions for file and directory management tasks such as creating, removing, renaming, and listing files and directories. It also includes functions for file operations like reading and writing, as well as retrieving system and environmental information. |
| upload_time | 2024-07-22 00:53:14 |
| maintainer | None |
| docs_url | None |
| author | Ahmed ZOUITANE |
| requires_python | >=3.6 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# osManag
`osManag`(Operating System Management) is a Python library for managing files and folders easily and quickly. The library includes multiple functions for creating, reading, writing, and deleting files and folders, as well as changing directories and listing directory contents.
#### Functions
Here’s a description of each function in the `osManang` module:
1. **`touch(File_Name)`**
- **Description:** Creates an empty file if it does not already exist.
- **Usage:**
```python
#Examples 1:
osManang.touch('filename.txt')
#Examples 2:
File = osManang.touch('filename.txt')
print(File)
```
2. **`cat(File_Name)`**
- **Description:** Reads and returns the contents of the specified file.
- **Usage:**
```python
#Examples 1:
content = osManang.cat('filename.txt')
print(content)
```
3. **`nano(File_Name, Mode, Write)`**
- **Description:** Writes content to a file. The mode can be 'w' (write) or 'a' (append).
- **Usage:**
```python
#Examples 1:
osManang.nano('filename.txt', 'w', 'Hello, World!')
#Examples 2:
File = osManang.nano('filename.txt', 'w', 'Hello, World!')
print(File)
```
4. **`rm(File_Name)`**
- **Description:** Deletes the specified file.
- **Usage:**
```python
#Examples 1:
osManang.rm('filename.txt')
#Examples 2:
File = osManang.rm('filename.txt')
print(File)
```
5. **`mkdir(Folder_Name)`**
- **Description:** Creates a new folder if it does not already exist.
- **Usage:**
```python
#Examples 1:
osManang.mkdir('foldername')
#Examples 2:
File = osManang.mkdir('foldername')
print(File)
```
6. **`rmdir(Folder_Name)`**
- **Description:** Deletes the specified folder.
- **Usage:**
```python
#Examples 1:
osManang.rmdir('foldername')
#Examples 2:
File = osManang.rmdir('foldername')
print(File)
```
7. **`ren(Name, New_Name)`**
- **Description:** Renames a file or folder from `Name` to `New_Name`.
- **Usage:**
```python
#Examples 1:
osManang.ren('oldname', 'newname')
#Examples 2:
File = osManang.ren('oldname', 'newname')
print(File)
```
8. **`mv(source_path, destination_path)`**
- **Description:** Moves a file or folder from `source_path` to `destination_path`.
- **Usage:**
```python
#Examples 1:
osManang.mv('source_path', 'destination_path')
#Examples 2:
File = osManang.mv('source_path', 'destination_path')
print(File)
```
9. **`cd(path)`**
- **Description:** Changes the current working directory to the specified `path`.
- **Usage:**
```python
#Examples 1:
osManang.cd('path')
#Examples 2:
path = osManang.cd('path')
print(path)
```
10. **`tree(chomain)`**
- **Description:** Returns a tree-like structure of the directory at `chomain`.
- **Usage:**
```python
#Examples 1:
structure = osManang.tree('path')
print(structure)
```
11. **`pwd()`**
- **Description:** Returns the current working directory.
- **Usage:**
```python
#Examples 1:
cwd = osManang.pwd()
print(cwd)
```
12. **`ls(path)`**
- **Description:** Lists the contents of the directory at `path`.
- **Usage:**
```python
#Examples 1:
contents = osManang.ls('path')
print(contents)
```
13. **`ls_l(path)`**
- **Description:** Lists the contents of the directory at `path` with details such as size and last modified time.
- **Usage:**
```python
#Examples 1:
details = osManang.ls_l('path')
print(details)
```
14. **`istime(path_Name)`**
- **Description:** Returns the last access time of the specified file.
- **Usage:**
```python
#Examples 1:
last_access = osManang.istime('filename.txt')
print(last_access)
```
15. **`size(path_Name)`**
- **Description:** Returns the size of the specified file.
- **Usage:**
```python
#Examples 1:
file_size = osManang.size('filename.txt')
print(file_size)
```
16. **`get_info()`**
- **Description:** Returns a string containing environment variables and their values.
- **Usage:**
```python
#Examples 1:
info = osManang.get_info()
print(info)
```
17. **`get_path()`**
- **Description:** Returns a string containing executable paths.
- **Usage:**
```python
#Examples 1:
exec_paths = osManang.get_path()
print(exec_paths)
```
This module provides a comprehensive set of file and directory management tools suitable for various tasks involving filesystem operations.
Raw data
{
"_id": null,
"home_page": "https://github.com/ZOUITANE-Ahmed/osManag.git",
"name": "osManag",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Ahmed ZOUITANE",
"author_email": "zouitane.ahmed02@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fd/b0/263dd0222a76debd4c65a4c2789f17776895e88de6e2af977960605822eb/osmanag-0.1.1.tar.gz",
"platform": null,
"description": "# osManag\r\n\r\n`osManag`(Operating System Management) is a Python library for managing files and folders easily and quickly. The library includes multiple functions for creating, reading, writing, and deleting files and folders, as well as changing directories and listing directory contents.\r\n\r\n#### Functions\r\n\r\nHere\u2019s a description of each function in the `osManang` module:\r\n\r\n1. **`touch(File_Name)`**\r\n - **Description:** Creates an empty file if it does not already exist.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.touch('filename.txt')\r\n #Examples 2:\r\n File = osManang.touch('filename.txt')\r\n print(File)\r\n ```\r\n\r\n2. **`cat(File_Name)`**\r\n - **Description:** Reads and returns the contents of the specified file.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n content = osManang.cat('filename.txt')\r\n print(content)\r\n ```\r\n\r\n3. **`nano(File_Name, Mode, Write)`**\r\n - **Description:** Writes content to a file. The mode can be 'w' (write) or 'a' (append).\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.nano('filename.txt', 'w', 'Hello, World!')\r\n #Examples 2:\r\n File = osManang.nano('filename.txt', 'w', 'Hello, World!')\r\n print(File)\r\n ```\r\n\r\n4. **`rm(File_Name)`**\r\n - **Description:** Deletes the specified file.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.rm('filename.txt')\r\n #Examples 2:\r\n File = osManang.rm('filename.txt')\r\n print(File)\r\n ```\r\n\r\n5. **`mkdir(Folder_Name)`**\r\n - **Description:** Creates a new folder if it does not already exist.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.mkdir('foldername')\r\n #Examples 2:\r\n File = osManang.mkdir('foldername')\r\n print(File)\r\n ```\r\n\r\n6. **`rmdir(Folder_Name)`**\r\n - **Description:** Deletes the specified folder.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.rmdir('foldername')\r\n #Examples 2:\r\n File = osManang.rmdir('foldername')\r\n print(File)\r\n ```\r\n\r\n7. **`ren(Name, New_Name)`**\r\n - **Description:** Renames a file or folder from `Name` to `New_Name`.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.ren('oldname', 'newname')\r\n #Examples 2:\r\n File = osManang.ren('oldname', 'newname')\r\n print(File)\r\n ```\r\n\r\n8. **`mv(source_path, destination_path)`**\r\n - **Description:** Moves a file or folder from `source_path` to `destination_path`.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.mv('source_path', 'destination_path')\r\n #Examples 2:\r\n File = osManang.mv('source_path', 'destination_path')\r\n print(File)\r\n ```\r\n\r\n9. **`cd(path)`**\r\n - **Description:** Changes the current working directory to the specified `path`.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n osManang.cd('path')\r\n #Examples 2:\r\n path = osManang.cd('path')\r\n print(path)\r\n ```\r\n\r\n10. **`tree(chomain)`**\r\n - **Description:** Returns a tree-like structure of the directory at `chomain`.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n structure = osManang.tree('path')\r\n print(structure)\r\n ```\r\n\r\n11. **`pwd()`**\r\n - **Description:** Returns the current working directory.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n cwd = osManang.pwd()\r\n print(cwd)\r\n ```\r\n\r\n12. **`ls(path)`**\r\n - **Description:** Lists the contents of the directory at `path`.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n contents = osManang.ls('path')\r\n print(contents)\r\n ```\r\n\r\n13. **`ls_l(path)`**\r\n - **Description:** Lists the contents of the directory at `path` with details such as size and last modified time.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n details = osManang.ls_l('path')\r\n print(details)\r\n ```\r\n\r\n14. **`istime(path_Name)`**\r\n - **Description:** Returns the last access time of the specified file.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n last_access = osManang.istime('filename.txt')\r\n print(last_access)\r\n ```\r\n\r\n15. **`size(path_Name)`**\r\n - **Description:** Returns the size of the specified file.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n file_size = osManang.size('filename.txt')\r\n print(file_size)\r\n ```\r\n\r\n16. **`get_info()`**\r\n - **Description:** Returns a string containing environment variables and their values.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n info = osManang.get_info()\r\n print(info)\r\n ```\r\n\r\n17. **`get_path()`**\r\n - **Description:** Returns a string containing executable paths.\r\n - **Usage:**\r\n ```python\r\n #Examples 1:\r\n exec_paths = osManang.get_path()\r\n print(exec_paths)\r\n ```\r\n\r\nThis module provides a comprehensive set of file and directory management tools suitable for various tasks involving filesystem operations.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "The `osManag`(Operating System Management)library provides a set of utility functions for file and directory management tasks such as creating, removing, renaming, and listing files and directories. It also includes functions for file operations like reading and writing, as well as retrieving system and environmental information.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/ZOUITANE-Ahmed/osManag.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fdb0263dd0222a76debd4c65a4c2789f17776895e88de6e2af977960605822eb",
"md5": "8c1bc91eb80d0f01077c20b3519d188f",
"sha256": "ce7bee1b409edc1db7f15254b89cd27e5c3bb3bc7f20506a61745975b0f39953"
},
"downloads": -1,
"filename": "osmanag-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "8c1bc91eb80d0f01077c20b3519d188f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4753,
"upload_time": "2024-07-22T00:53:14",
"upload_time_iso_8601": "2024-07-22T00:53:14.917283Z",
"url": "https://files.pythonhosted.org/packages/fd/b0/263dd0222a76debd4c65a4c2789f17776895e88de6e2af977960605822eb/osmanag-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-22 00:53:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ZOUITANE-Ahmed",
"github_project": "osManag",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "osmanag"
}