]> granicus.if.org Git - php/commitdiff
Remove unused example/test fileinfo.php script
authorPeter Kokot <peterkokot@gmail.com>
Sun, 5 May 2019 23:48:50 +0000 (01:48 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Wed, 8 May 2019 19:58:52 +0000 (21:58 +0200)
ext/fileinfo/fileinfo.php [deleted file]

diff --git a/ext/fileinfo/fileinfo.php b/ext/fileinfo/fileinfo.php
deleted file mode 100755 (executable)
index 11bb6ed..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env php
-<?php
-if(!extension_loaded('fileinfo')) {
-       dl('fileinfo.' . PHP_SHLIB_SUFFIX);
-}
-if(!extension_loaded('fileinfo')) {
-       die("fileinfo extension is not available, please compile it.\n");
-}
-
-// normal operation
-$res = finfo_open(FILEINFO_MIME); /* return mime type ala mimetype extension */
-$files = glob("*");
-foreach ($files as $file) {
-       echo finfo_file($res, $file) . "\n";
-}
-finfo_close($res);
-
-// OO mode
-/*
- * FILEINFO_PRESERVE_ATIME - if possible preserve the original access time
- * FILEINFO_SYMLINK - follow symlinks
- * FILEINFO_DEVICES - look at the contents of blocks or character special devices
- * FILEINFO_COMPRESS - decompress compressed files
- */
-$fi = new finfo(FILEINFO_PRESERVE_ATIME|FILEINFO_SYMLINK|FILEINFO_DEVICES|FILEINFO_COMPRESS);
-$files = glob("*");
-foreach ($files as $file) {
-        echo $fi->buffer(file_get_contents($file)) . "\n";
-}
-?>