Skip to main content

My file-item

Project description

Documentation: https://file-item.readthedocs.io/en/latest/

Installation

pip install file_item

Examples:

from file_item import File

basedir = File.basedir(__file__)

file_1 = basedir.joinpath('test1.csv')
file_2 = File('/home/user/test2.csv')
file_3 = File.from_strings('/home/user/', 'test3.csv')

print(repr(file_1))
# PosixPath('test1.csv')

print(file_2)
# /home/user/test2.csv

print(file_1 == file_2)
# False

print(file_3.name)
# test3.csv

file_1.create_folder()

print(File.get_file_name('test*.csv'))
# test-.csv

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

file-item-1.0.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

file_item-1.0.0-py3-none-any.whl (3.9 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