/**
 * Determine if the given path is a regular file.
 *
 * @return bool Returns TRUE if the filename exists and is a regular file, FALSE otherwise.
 */
public function isFile(): bool

Examples

if ($filesystem->file('/foo/1.txt')->isFile()) {
    // do something...
}

Getting Started

Methods

Filesystem
File
Directory