/**
 * Return current path.
 *
 * @return string|null Current path
 */
public function path(): ?string

Examples

$result = $filesystem->file('/foo/1.txt')->path();

The above example will output:

/foo/1.txt

Getting Started

Methods

Filesystem
File
Directory