/**
 * Get the mime-type of a given file.
 *
 * @return string The mime-type of a given file.
 */
public function mimeType(): string

Examples

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

echo $result;

The above example will output:

text/plain

Getting Started

Methods

Filesystem
File
Directory