Prefixes are parsed as literal strings, so regular expressions and wildcards cannot be used in this context. With a prefix of "photos/", and a delimiter of "/", you would get: With a prefix of "" (meaning all files), and a delimiter of "/", you would get: If you use a prefix of "photos/c" you will get the same list as if you specify "photos/cats/" With the default prefix of "" and no delimiter, you get all of the files: Each item returned isĮither an "upload" (a file) or a "folder" (representing one orĪs an example, if you have these files in your bucket: Replacing all of the files in that folder. If found after the file name prefix, the delimiter is treatedĪs the end of a folder name, and the folder name is returned, The results to only files starting with that prefix.Īnother option is to specify a delimiter (usually "/") for folder You can optionally specify a file name prefix, which will restrict Response = b2_list_file_names(bucketId =. To go through all of the file names in a bucket, use a loop like Hidden will not be returned to see all versions of a file, There may be many file versions for the same name, but thisĬall will return each name only once. Each time you call, it returns a "nextFileName" thatĬan be used as the starting point for the next call. This call returns at most 1000 file names per transaction, but itĬan be called repeatedly to scan through all of the file names inĪ bucket. Lists the names of all files in a bucket, starting at a given name.
0 Comments
Leave a Reply. |