|
|
|
|
|
by gizmo686
2910 days ago
|
|
B2 doesn't have folders. The online interface simply assumes that a slash in the filename should be represented as a folder; and they encourage apps to do the same. I believe they also enforce a max distance between slashes that is smaller than the max filename length. What this means is that their is no way to, for instance, query what the root directories are, short of listing all files. If you have a directory, you can list its contents using a prefix search (although the prefix need not be a directory, and this will not just list the toplevel elements) |
|
>their is no way to, for instance, query what the root directories are, short of listing all files
This is not true! Try this from the b2.py command line:
b2.py ls <bucketName>
That would list all the top level folders. The APIs are designed to support two things: 1) listing all files, or 2) navigating and listing the contents of each folder.