-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename Directory using laravel #126
Comments
You could try Also if there is a bug, you could make a PR with the fix |
Hi, could you test #127 |
No its not working. |
These are working in laravel-- |
you did something wrong, I have created the branch laravel-google-drive-ext-demo/tree/no_virtual_paths And the demo it's working laravel-google-drive-ext-demo/routes/web.php#L201-L220 $directoryName = 'test';
// First we need to create a directory to rename
Storage::disk('google')->makeDirectory($directoryName);
// Now find that directory and use its ID (path) to rename it
$dir = collect(Storage::disk('google')->listContents('/', false))
->first(fn (\League\Flysystem\StorageAttributes $file) =>
$file->type() === 'dir' && $file->extraMetadata()['name'] === $directoryName
); // there can be duplicate file names!
if (! $dir) {
return 'Directory "'.$directoryName.'" does not exist!';
}
Storage::disk('google')->move($dir->path(), 'new-test'); you know how to use another branch in the vendor? |
Rename directory using directory id in laravel.
Storage::disk('google');
using this command
The text was updated successfully, but these errors were encountered: