Metadata-Version: 2.4
Name: fsplus
Version: 1.0.0
Summary: A Python library for safely copying, moving, and deleting files with path-traversal protection, overwrite confirmation, and checksum verification.
Project-URL: Homepage, https://github.com/justTil/fsplus
Project-URL: Documentation, https://docs.fsplus.org/fsplus
Project-URL: Issues, https://github.com/justTil/fsplus/issues
Author-email: Til Schwarze <tschwarze@fsplus.org>
License-Expression: MIT
Keywords: checksum,copy,delete,error handling,file operations,filesystem,move,overwrite protection,path traversal,safe
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: hatchling>=1.29.0; extra == 'dev'
Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
Requires-Dist: pytest>=9.0; extra == 'dev'
Description-Content-Type: text/markdown

# fsplus

Safe file system operations for Python — copy, move, create, and delete with path-traversal protection, overwrite confirmation, and checksum verification.

## Install

```bash
pip install fsplus
```

## Operations

| Function | Description |
|---|---|
| `copy_file` | Copy a file with overwrite confirmation |
| `move_file` | Move a file with checksum verification |
| `create_file` | Create a new file with content |
| `create_temp_file` | Create a temporary file |
| `clear_directory` | Remove all contents of a directory |
| `delete_directory` | Remove a directory entirely |

## Usage

```python
from fsplus import copy_file, move_file, delete_directory

# Copy a file
copy_file("/data/report.csv", "/backup/")

# Overwrite requires explicit confirmation
copy_file("/data/report.csv", "/backup/", overwrite=True, required_partial_path="backup")

# Move with automatic checksum verification
move_file("/data/report.csv", "/archive/")

# Rename on the way
move_file("/data/report.csv", "/archive/", new_name="report_2024.csv")
```

## License

MIT