public function url_stat($path, $flags)
    {
        $now  = time();
        $stat = [
            'dev'    =>    0, // no specific device number
            'ino'    =>    0, // no inode number
            'mode'    =>    0, // inode protection mode
            'nlink'    =>    1, // number of links
            'uid'    =>    0, // no userid of owner
            'gid'    =>    0, // no groupid of owner
            'rdev'    =>    0, // no device type, not inode device
            'size'    =>    0, // size in bytes
            'atime'    =>    $now, // time of last access (Unix timestamp)
            'mtime'    =>    $now, // time of last modification (Unix timestamp)
            'ctime' =>    $now, // time of last inode change (Unix timestamp)
            'blksize' => 512, // blocksize of filesystem IO
            'blocks'  => 0, // number of 512-byte blocks allocated **
        ];

        if (array_has(self::$folders, $path)) {
            $stat['mode'] = self::DIR_MODE;

            return $stat;
        }

        $contents = self::cache()->get($path);

        if (false === $contents) {
            return false;
        }

        $size = strlen($contents);
        $stat['mode']   = self::FILE_MODE;
        $stat['size']   = $size;
        $stat['blocks'] = (int)(($size + 512) / 512);

        return $stat;
    }
public function url_stat($path, $flags)
    {
        $now  = time();
        $stat = [
            'dev'    =>    0, // no specific device number
            'ino'    =>    0, // no inode number
            'mode'    =>    0, // inode protection mode
            'nlink'    =>    1, // number of links
            'uid'    =>    0, // no userid of owner
            'gid'    =>    0, // no groupid of owner
            'rdev'    =>    0, // no device type, not inode device
            'size'    =>    0, // size in bytes
            'atime'    =>    $now, // time of last access (Unix timestamp)
            'mtime'    =>    $now, // time of last modification (Unix timestamp)
            'ctime' =>    $now, // time of last inode change (Unix timestamp)
            'blksize' => 512, // blocksize of filesystem IO
            'blocks'  => 0, // number of 512-byte blocks allocated **
        ];

        if (array_has(self::$folders, $path)) {
            $stat['mode'] = self::DIR_MODE;

            return $stat;
        }

        $contents = self::cache()->get($path);

        if (false === $contents) {
            return false;
        }

        $size = strlen($contents);
        $stat['mode']   = self::FILE_MODE;
        $stat['size']   = $size;
        $stat['blocks'] = (int)(($size + 512) / 512);

        return $stat;
    }
public function url_stat ( $ path , $ flags ) { $ now = time ( ) ; $ stat = [ 'dev' => 0 , // no specific device number 'ino' => 0 , // no inode number 'mode' => 0 , // inode protection mode 'nlink' => 1 , // number of links 'uid' => 0 , // no userid of owner 'gid' => 0 , // no groupid of owner 'rdev' => 0 , // no device type, not inode device 'size' => 0 , // size in bytes 'atime' => $ now , // time of last access (Unix timestamp) 'mtime' => $ now , // time of last modification (Unix timestamp) 'ctime' => $ now , // time of last inode change (Unix timestamp) 'blksize' => 512 , // blocksize of filesystem IO 'blocks' => 0 , // number of 512-byte blocks allocated ** ] ; if ( array_has ( self :: $ folders , $ path ) ) { $ stat [ 'mode' ] = self :: DIR_MODE ; return $ stat ; } $ contents = self :: cache ( ) -> get ( $ path ) ; if ( false === $ contents ) { return false ; } $ size = strlen ( $ contents ) ; $ stat [ 'mode' ] = self :: FILE_MODE ; $ stat [ 'size' ] = $ size ; $ stat [ 'blocks' ] = ( int ) ( ( $ size + 512 ) / 512 ) ; return $ stat ; }
Returns stat information for a given path.

@param  string $path
@param  int $flags
@return array stat information.
Returns stat information for a given path .