phore / filesystem
Acces files layer
Installs: 10 985
Dependents: 33
Suggesters: 1
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >8.1
- ext-json: *
- ext-yaml: *
- phore/core: *
- psr/http-message: ^1.0@dev
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-08 22:34:08 UTC
README
File access functions
- Working with sub-paths
- Checking symbolic links
Installation
compser require phore/filesystem
General usage
echo phore_uri("/tmp/some.file")->withDirName();
will result in
/tmp
Subpath
echo phore_uri("/tmp")->withSubPath("./some/other/file")
/tmp/some/other/file
Assertions
phore_uri("/tmp")->assertIsFile()->assertIsWritable();
Reading YAML
phore_uri("/tmp/somefile.yml")->assertFile()->get_yaml();
Tempoary Files
Will be unlinked when object destructs.
$file = new PhoreTempFile();