Skip to main content

A Python library for cross-platform filesystem operations, providing classes for handling files and directories.

Project description

fsinfo

fsinfo is a Python library providing a high-level abstraction for working with filesystem paths, files, and directories in a cross-platform way. It simplifies file system operations like querying file attributes, manipulating directories, and handling files across Linux, macOS, and Windows.

Features

  • FileSystemInfo: A base class for handling common file system information retrieval such as creation, modification, and access times.
  • FileInfo: Extends FileSystemInfo for file-specific operations, including reading, writing, copying, and moving files.
  • DirectoryInfo: Extends FileSystemInfo for directory-specific operations, like listing contents, calculating directory size, and recursive deletion.

Usage

Working with Files

from  YourPackageName.fileinfo  import  FileInfo 

file = FileInfo('/path/to/your/file.txt')
print(file.creation_time) file.copy_to('/path/to/destination/file.txt', overwrite=True)

Working with Directories

from  YourPackageName.directoryinfo  import  DirectoryInfo 

directory = DirectoryInfo('/path/to/your/directory')
print(directory.length)  # Total size of files in the directory  for  file_info  in  directory.get_files():
	print(file_info.name)

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fsinfo-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

fsinfo-0.0.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file fsinfo-0.0.1.tar.gz.

File metadata

  • Download URL: fsinfo-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.7

File hashes

Hashes for fsinfo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3787f428b75552170943623b6a9533b3097be704fa28df4d511735e10b2a0c92
MD5 0ec5e6257da9f35f6d3137f595a8b102
BLAKE2b-256 e47b928b79c3c847fa5088dc92d8550674492ea1703e434bd7d226ee05708d1c

See more details on using hashes here.

File details

Details for the file fsinfo-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fsinfo-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.7

File hashes

Hashes for fsinfo-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f84724fc4f94f81d1e64b53bb597e0d8b9871f8dd94fcd8e744d316cafca03ef
MD5 2453eb34921ac1e67ab5bf0863fd83e7
BLAKE2b-256 98c9fd72141f7d896037ffa2d383d1c9d27aee79643be101c80b8b946caa03be

See more details on using hashes here.

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