nerdexam
GoogleGoogle

PROFESSIONAL-CLOUD-DEVELOPER · Question #181

PROFESSIONAL-CLOUD-DEVELOPER Question #181: Real Exam Question with Answer & Explanation

The correct answer is A: Create an object with the name of the subdirectory ending with a trailing slash ('/') that is zero. https://cloud.google.com/storage/docs/folders If you create an empty folder using the Google Cloud console, Cloud Storage creates a zero-byte object as a placeholder. For example, if you create a folder called folder in a bucket called my- bucket, a zero- byte object called gs://

Building and testing applications

Question

You are developing an application that needs to store files belonging to users in Cloud Storage. You want each user to have their own subdirectory in Cloud Storage. When a new user is created, the corresponding empty subdirectory should also be created. What should you do?

Options

  • ACreate an object with the name of the subdirectory ending with a trailing slash ('/') that is zero
  • BCreate an object with the name of the subdirectory, and then immediately delete the object within
  • CCreate an object with the name of the subdirectory that is zero bytes in length and has WRITER
  • DCreate an object with the name of the subdirectory that is zero bytes in length. Set the Content-

Explanation

https://cloud.google.com/storage/docs/folders If you create an empty folder using the Google Cloud console, Cloud Storage creates a zero-byte object as a placeholder. For example, if you create a folder called folder in a bucket called my- bucket, a zero- byte object called gs://my-bucket/folder/ is created. This placeholder is discoverable by other tools when listing the objects in the bucket, for example when using the gsutil ls command.

Topics

#Cloud Storage#Object Storage#Simulated Directories#Application Development

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER PracticeBrowse All PROFESSIONAL-CLOUD-DEVELOPER Questions