phore/filesystem

Acces files layer

v1.0.3 2020-06-02 22:14 UTC

This package is auto-updated.

Last update: 2024-04-09 00:58:07 UTC


README

Actions Status

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();