pekkis / directory-calculator
Directory calculation library
Installs: 73 897
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=7.1.0
- ramsey/uuid: ~3.8
Requires (Dev)
- phpunit/phpunit: ~7.3
This package is not auto-updated.
Last update: 2024-12-21 20:12:49 UTC
README
A library for calculating directories for objects (files)
Use case
One shall not put too many files (or sub directories) in one directory. Classic problem.
This library calculates more or less safe directories for objects identifiable by something (id, uuid, etc).
Quickstart
<?php use Pekkis\DirectoryCalculator\DirectoryCalculator; use Pekkis\DirectoryCalculator\Strategy\UniversalLeveledStrategy; $calculator = new DirectoryCalculator(new UniversalLeveledStrategy()); $directory = $calculator->calculateDirectory($someObjectImplementingRequiredInterface);