smart people. I working with firebase for my android app. And i need rename a folder specific in Storage. Somebody may please teach me how do it?
thanks for your time
smart people. I working with firebase for my android app. And i need rename a folder specific in Storage. Somebody may please teach me how do it?
thanks for your time
The first thing you should know is that Cloud Storage doesn't really have "folders". Therefore, there is no operation to rename a folder.
You can think of Storage as a giant map of keys to values, where the keys are the names of the files (the full path), and the values are the content of the files. When the prefix for a path name overlaps with another path, it creates the appearance of a folder, which is helpful for organizing your data and navigating them in the console. But there are still no actual folders like you have in your computer's filesystem.
The closest thing to renaming a folder is actually just renaming each file whose path contains that "folder". So, if you have this file:
/foo/bar/file.jpg
and you want to rename "bar" to "baz", then you need to rename or somehow move the file to have this name instead:
/foo/baz/file.jpg
The operation is on the entire path of the file, not what appears to be a "folder" in the path. You will have to do this for each file whose name starts with "/foo/bar".
See also: Move/rename folder in Google Cloud Storage using nodejs gcloud api