BLOCKS Reference

Google Cloud

List files from GCS

Overview

This BLOCK creates a list of files saved in a Google Cloud Storage (GCS) bucket and stores the list into a variable.

The file list is stored as array data like the following example:

[
  "gs://my-bucket/foo.jpg",
  "gs://my-bucket/bar/baz.jpg",
  "gs://my-bucket/xxx/yyy/zzz.jpg"
]

Properties

Property Explanation
BLOCK name Configure the name displayed on this BLOCK.
GCP service account Select the GCP service account to use with this BLOCK.
File GCS URL

Designate a pattern for the GCS files you want to include in the list. The BLOCK will search within all nested folders for files that match the designated pattern.

The formatting for this pattern is as follows:

gs://BUCKET/PATTERN
  • Use the GCS URL format (gs://).
  • You must include the bucket.
  • Use * as the wildcard character in your pattern (see examples in the chart below).

The following chart contains some example patterns:

Example Explanation
gs://my-bucket/* Adds every file in the bucket “my-bucket” to the list.
gs://my-bucket/*.jpg Adds any files in the bucket “my-bucket” with the extension .jpg to the list.
gs://my-bucket/*training* Adds any files from the bucket “my-bucket” that contain the string training within their file name to the list.
Results variable

Designate the variable that will store the file list. The file list is stored as array data like the following example:

[
  "gs://my-bucket/foo.jpg",
  "gs://my-bucket/bar/baz.jpg",
  "gs://my-bucket/xxx/yyy/zzz.jpg"
]
BLOCK memos Make notes about this BLOCK.

この情報は役に立ちましたか?