src/SftpAdapter.php
protected function normalizeListingObject($path, array $object)
    {
        $permissions = $this->normalizePermissions($object['permissions']);
        $type = isset($object['type']) && ($object['type'] === 2) ?  'dir' : 'file';

        $timestamp = $object['mtime'];

        if ($type === 'dir') {
            return compact('path', 'timestamp', 'type');
        }

        $visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE;
        $size = (int) $object['size'];

        return compact('path', 'timestamp', 'type', 'visibility', 'size');
    }
protected function normalizeListingObject($path, array $object)
    {
        $permissions = $this->normalizePermissions($object['permissions']);
        $type = isset($object['type']) && ($object['type'] === 2) ?  'dir' : 'file';

        $timestamp = $object['mtime'];

        if ($type === 'dir') {
            return compact('path', 'timestamp', 'type');
        }

        $visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE;
        $size = (int) $object['size'];

        return compact('path', 'timestamp', 'type', 'visibility', 'size');
    }
protected function normalizeListingObject ( $ path , array $ object ) { $ permissions = $ this -> normalizePermissions ( $ object [ 'permissions' ] ) ; $ type = isset ( $ object [ 'type' ] ) && ( $ object [ 'type' ] === 2 ) ? 'dir' : 'file' ; $ timestamp = $ object [ 'mtime' ] ; if ( $ type === 'dir' ) { return compact ( 'path' , 'timestamp' , 'type' ) ; } $ visibility = $ permissions & 0044 ? AdapterInterface :: VISIBILITY_PUBLIC : AdapterInterface :: VISIBILITY_PRIVATE ; $ size = ( int ) $ object [ 'size' ] ; return compact ( 'path' , 'timestamp' , 'type' , 'visibility' , 'size' ) ; }
Normalize a listing response.

@param string $path
@param array  $object

@return array
Normalize a listing response .