pathutility is a Python library for working with file paths.
Project description
PathUtils
Introduction
PathUtils is a utility class for handling various path-related operations in Python. It provides methods for retrieving file information, checking file existence, creating directories, detecting file encoding, and listing files in a directory.
Installation
To install PathUtils, simply use pip:
pip install pathutility
Usage Example
Here's an example of how to use the PathUtils class:
from pathutility import PathUtils
# Create an instance of PathUtils
path_util = PathUtils()
# Get file information
file_path = '/path/to/file.txt'
print(f"File name: {path_util.get_filename(file_path)}")
print(f"File size: {path_util.get_file_size(file_path)} bytes")
print(f"File creation time: {path_util.get_file_creation_time(file_path)}")
# List files in a directory
directory_path = '/path/to/directory'
files_list = path_util.list_files_in_directory(directory_path)
print(f"Files in directory: {files_list}")
Documentation
The Sphinx-generated documentation for PathUtils can be found here.
Contribution
Feel free to contribute by submitting issues here.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file pathutility-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pathutility-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5762d1a4748bd1392dafcf26479be3a5ad10d11607f30144c8f6216eb0c8404 |
|
MD5 | 33d7ba7e6bf0f3aaebf21d3bb43400e4 |
|
BLAKE2b-256 | 67689faa7bad7e64248079ff9ada728d4123a4082df4746a259dbe2e95d7a313 |