src/GoogleDriveAdapter.php
protected function splitPath($path, $getParentId = true)
    {
        if ($path === '' || $path === '/') {
            $fileName = $this->root;
            $dirName = '';
        } else {
            $paths = explode('/', $path);
            $fileName = array_pop($paths);
            if ($getParentId) {
                $dirName = $paths ? array_pop($paths) : '';
            } else {
                $dirName = join('/', $paths);
            }
            if ($dirName === '') {
                $dirName = $this->root;
            }
        }
        return [
            $dirName,
            $fileName
        ];
    }
protected function splitPath($path, $getParentId = true)
    {
        if ($path === '' || $path === '/') {
            $fileName = $this->root;
            $dirName = '';
        } else {
            $paths = explode('/', $path);
            $fileName = array_pop($paths);
            if ($getParentId) {
                $dirName = $paths ? array_pop($paths) : '';
            } else {
                $dirName = join('/', $paths);
            }
            if ($dirName === '') {
                $dirName = $this->root;
            }
        }
        return [
            $dirName,
            $fileName
        ];
    }
protected function splitPath ( $ path , $ getParentId = true ) { if ( $ path === '' || $ path === '/' ) { $ fileName = $ this -> root ; $ dirName = '' ; } else { $ paths = explode ( '/' , $ path ) ; $ fileName = array_pop ( $ paths ) ; if ( $ getParentId ) { $ dirName = $ paths ? array_pop ( $ paths ) : '' ; } else { $ dirName = join ( '/' , $ paths ) ; } if ( $ dirName === '' ) { $ dirName = $ this -> root ; } } return [ $ dirName , $ fileName ] ; }
Path splits to dirId, fileId or newName

@param string $path

@return array [ $dirId , $fileId|newName ]
Path splits to dirId fileId or newName