File::type PHP Méthode

type() public static méthode

Get the file type of a given file.
public static type ( string $path ) : string
$path string
Résultat string
        public static function type($path)
        {
            return \Illuminate\Filesystem\Filesystem::type($path);
        }

Usage Example

Exemple #1
0
 public static function isSameType(File $origin, $filename)
 {
     $extensions = explode('.', pathinfo($filename, PATHINFO_BASENAME));
     array_shift($extensions);
     return $origin->type() == array_shift($extensions);
 }
All Usage Examples Of File::type