src/GoogleDriveAdapter.php
protected function normaliseUploadedFile($uploadedFile, $localPath, $visibility)
    {
        list ($parentId, $fileName) = $this->splitPath($localPath);

        if (!($uploadedFile instanceof Google_Service_Drive_DriveFile)) {
            return false;
        }

        $this->cacheFileObjects[$uploadedFile->getId()] = $uploadedFile;
        if (! $this->getFileObject($localPath)) {
            $this->cacheFileObjectsByName[$parentId . '/' . $fileName] = $uploadedFile;
        }
        $result = $this->normaliseObject($uploadedFile, Util::dirname($localPath));

        if ($visibility && $this->setVisibility($localPath, $visibility)) {
            $result['visibility'] = $visibility;
        }

        return $result;
    }
protected function normaliseUploadedFile($uploadedFile, $localPath, $visibility)
    {
        list ($parentId, $fileName) = $this->splitPath($localPath);

        if (!($uploadedFile instanceof Google_Service_Drive_DriveFile)) {
            return false;
        }

        $this->cacheFileObjects[$uploadedFile->getId()] = $uploadedFile;
        if (! $this->getFileObject($localPath)) {
            $this->cacheFileObjectsByName[$parentId . '/' . $fileName] = $uploadedFile;
        }
        $result = $this->normaliseObject($uploadedFile, Util::dirname($localPath));

        if ($visibility && $this->setVisibility($localPath, $visibility)) {
            $result['visibility'] = $visibility;
        }

        return $result;
    }
protected function normaliseUploadedFile ( $ uploadedFile , $ localPath , $ visibility ) { list ( $ parentId , $ fileName ) = $ this -> splitPath ( $ localPath ) ; if ( ! ( $ uploadedFile instanceof Google_Service_Drive_DriveFile ) ) { return false ; } $ this -> cacheFileObjects [ $ uploadedFile -> getId ( ) ] = $ uploadedFile ; if ( ! $ this -> getFileObject ( $ localPath ) ) { $ this -> cacheFileObjectsByName [ $ parentId . '/' . $ fileName ] = $ uploadedFile ; } $ result = $ this -> normaliseObject ( $ uploadedFile , Util :: dirname ( $ localPath ) ) ; if ( $ visibility && $ this -> setVisibility ( $ localPath , $ visibility ) ) { $ result [ 'visibility' ] = $ visibility ; } return $ result ; }
Normalise a Drive File that has been created

@param Google_Service_Drive_DriveFile $uploadedFile
@param string $localPath
@param string $visibility
@return array|bool
Normalise a Drive File that has been created