google-cloud-storagegsutil

Google Cloud Storage: How to get list of new files in bucket/folder using gsutil


I have a bucket/folder into which a lot for files are coming in every minutes. How can I read only the new files based on file timestamp.

eg: list all files with timestamp > my_timestamp


Solution

  • This is not a feature that gsutil or the GCS API provides, as there is no way to list objects by timestamp.

    Instead, you could subscribe to new objects using the GCS Cloud Pub/Sub feature.