Skip to main content

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


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

pathutility-1.0.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page