String with path operations.
Project description
pathstring is a very small module that provides a string class which supports path operations. Technically, it subclasses str and delegates path related operations to pathlib.Path.
Differences from pathlib paths are:
Paths are strings, no need to cast them to strings.
It adds a path.rmtree() operation which invokes shutil.rmtree. Actually, since paths are strings, shutil.rmtree(path) will also work.
It adds a strict parameter to the relative_to operation which, when set to False, will also navigate up in the hierarchy.
It doesn’t support the slash operator for joining paths.
License
Copyright (C) 2019 H. Turgut Uyar <uyar@tekir.org>
pathstring is released under the BSD license. Read the included LICENSE.txt 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
Built Distribution
Hashes for pathstring-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18971b12acdaaba11f5f443552c7e4a0e5bba9d5092d4906ad40b42e28c4b2ed |
|
MD5 | 0770034593d60d9e257028e7f1426390 |
|
BLAKE2b-256 | 8bb1b9800f136d50e2797022c1e05836680194ad3bc6ed34b760964650626260 |