https://github.com/phore/phore-filesystem
File access functions
https://github.com/phore/phore-filesystem
phore-filesystem
Last synced: 5 months ago
JSON representation
File access functions
- Host: GitHub
- URL: https://github.com/phore/phore-filesystem
- Owner: phore
- License: mit
- Created: 2018-07-17T11:59:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-12-14T12:28:44.000Z (6 months ago)
- Last Synced: 2025-12-16T17:53:47.361Z (6 months ago)
- Topics: phore-filesystem
- Language: PHP
- Homepage: https://infracamp.org/project/phore/
- Size: 126 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phore-filesystem
[](https://github.com/phore/phore-filesystem/actions)
File access functions
- Working with sub-paths
- Checking symbolic links
## Installation
```
compser require phore/filesystem
```
## General usage
```php
echo phore_uri("/tmp/some.file")->withDirName();
```
will result in
```
/tmp
```
## Subpath
```php
echo phore_uri("/tmp")->withSubPath("./some/other/file")
```
```
/tmp/some/other/file
```
## Assertions
```php
phore_uri("/tmp")->assertIsFile()->assertIsWritable();
```
## Reading YAML
```php
phore_uri("/tmp/somefile.yml")->assertFile()->get_yaml();
```
## Tempoary Files
Will be unlinked when object destructs.
```
$file = new PhoreTempFile();
```