2017 © Pedro Peláez
 

library fileinfo

provides information about file

image

primipilus/fileinfo

provides information about file

  • Friday, February 10, 2017
  • by primipilus
  • Repository
  • 1 Watchers
  • 1 Stars
  • 274 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 7 % Grown

The README.md

FileInfo

Composer install

composer require "primipilus/fileinfo:~1.0"

Usage

$info = new FileInfo($path);

echo 'path: ' . $info->path, PHP_EOL;
echo 'mime: ' . $info->mime, PHP_EOL;
echo 'size: ' . $info->size . ' bytes', PHP_EOL;

echo 'dirname: ' . $info->dirname, PHP_EOL;
echo 'basename: ' . $info->basename, PHP_EOL;
echo 'extension: ' . $info->extension, PHP_EOL;
echo 'filename: ' . $info->filename, PHP_EOL;

if ($info->isImage) {
    echo 'width: ' . $info->image->width, PHP_EOL;
    echo 'height: ' . $info->image->height, PHP_EOL;
}

$info2 = new FileInfo($path2);

$info->equals($info2); // :bool
echo $info->sha1, PHP_EOL;
echo $info->md5, PHP_EOL;

$info->extensionCorrespondsToMime; // :bool
$info->extensionsByMime; // :string[]

The Versions

10/02 2017

dev-master

9999999-dev https://github.com/primipilus/fileinfo

provides information about file

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

by Leonid Gushchin

file info information about file

10/02 2017

v1.0.3.1

1.0.3.1 https://github.com/primipilus/fileinfo

provides information about file

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

by Leonid Gushchin

file info information about file

10/02 2017

v1.0.3

1.0.3.0 https://github.com/primipilus/fileinfo

provides information about file

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

by Leonid Gushchin

file info information about file

23/10 2016

v1.0.2

1.0.2.0 https://github.com/primipilus/fileinfo

provides information about file

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

by Leonid Gushchin

file info information about file

18/10 2016

v1.0.1

1.0.1.0 https://github.com/primipilus/fileinfo

provides information about file

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

by Leonid Gushchin

file info information about file

18/10 2016

v1.0.0

1.0.0.0 https://github.com/primipilus/fileinfo

provides information about file

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

by Leonid Gushchin

file info information about file