flysystem-google-drive icon indicating copy to clipboard operation
flysystem-google-drive copied to clipboard

createDir method doesn't comply to the docs/intent behavior

Open mpdx opened this issue 3 years ago • 3 comments

the method https://flysystem.thephpleague.com/v1/docs/usage/filesystem-api/#create-directories as described recursively creates a path.

So the result of calling createDir on any adapter i.e. $filesystem->createDir('foo/bar/baz') should be identical of mkdir -p foo/bar/baz (in the bash) while the google drive adapter ends with an error:

>>> $filesystem->createDir('foo/bar')
Google\Service\Exception with message '{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "notFound",
    "message": "File not found: foo.",
    "locationType": "parameter",
    "location": "fileId"
   }
  ],
  "code": 404,
  "message": "File not found: foo."
 }
}
'

mpdx avatar May 22 '21 16:05 mpdx

Did you try masbug/flysystem-google-drive-ext? The configs are the same and do the expected behavior

PaolaRuby avatar May 25 '21 13:05 PaolaRuby

Did you try masbug/flysystem-google-drive-ext? The configs are the same and do the expected behavior

Indeed I did! Although my first choice was nao-pon package (more :star: I guess :)). masbug package works as expected in this regard. Thanks for sharing and reply!

mpdx avatar May 25 '21 22:05 mpdx

@mpdx maybe you can give a ⭐ for the future

PaolaRuby avatar May 27 '21 15:05 PaolaRuby