PHPDaemon\FS\FileSystem::statPrepare PHP 메소드

statPrepare() 공개 정적인 메소드

Prepare value of stat()
public static statPrepare ( mixed $stat ) : array
$stat mixed Data
리턴 array hash
    public static function statPrepare($stat)
    {
        if ($stat === -1 || !$stat) {
            return -1;
        }
        $stat['type'] = FileSystem::$modeTypes[$stat['mode'] & 0170000];
        return $stat;
    }

Usage Example

예제 #1
0
파일: FileSystem.php 프로젝트: zenus/phpinx
 /**
  * lstat()
  * @param  string   $path Path
  * @param  callable $cb   Callback
  * @param  integer  $pri  Priority
  * @return resource|true
  */
 public static function lstat($path, $cb, $pri = EIO_PRI_DEFAULT)
 {
     $cb = CallbackWrapper::forceWrap($cb);
     if (!self::$supported) {
         call_user_func($cb, $path, FileSystem::statPrepare(lstat($path)));
         return true;
     }
     return eio_lstat($path, $pri, function ($path, $stat) use($cb) {
         call_user_func($cb, $path, FileSystem::statPrepare($stat));
     }, $path);
 }
All Usage Examples Of PHPDaemon\FS\FileSystem::statPrepare