nao-pon/flysystem-google-drive

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

mpdx opened this issue · 3 comments

mpdx commented

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."
 }
}
'

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

mpdx commented

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 ⭐ I guess :)). masbug package works as expected in this regard. Thanks for sharing and reply!

@mpdx maybe you can give a ⭐ for the future