exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 164 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 164
Topic #: 1
[All Professional Cloud Developer Questions]

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?

  • A. Create an object with the name of the subdirectory ending with a trailing slash ('/') that is zero bytes in length.
  • B. Create an object with the name of the subdirectory, and then immediately delete the object within that subdirectory.
  • C. Create an object with the name of the subdirectory that is zero bytes in length and has WRITER access control list permission.
  • D. Create an object with the name of the subdirectory that is zero bytes in length. Set the Content-Type metadata to CLOUDSTORAGE_FOLDER.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
zellck
Highly Voted 1 year, 4 months ago
Selected Answer: A
A is the answer. 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.
upvoted 7 times
...
__rajan__
Most Recent 7 months, 1 week ago
Selected Answer: A
When you create an object with the name of the subdirectory ending with a trailing slash, Cloud Storage will treat the object as a subdirectory. This means that you can then store other objects in the subdirectory.
upvoted 2 times
...
purushi
8 months, 3 weeks ago
Selected Answer: C
I go with C. WRITER permission and folder with zero bytes size is correct.
upvoted 1 times
...
NewComer200
12 months ago
Selected Answer: C
https://cloud.google.com/storage/docs/folders#overview According to the explanation upper URL, " Cloud Storage operates with a flat namespace, which means that folders don't actually exist within Cloud Storage. ". That's right. You can't create the state "foo/". This is an actual experience using Cloud Storage. Therefore, I think the correct answer is C.
upvoted 1 times
NewComer200
12 months ago
Sorry. I was mistaken. The correct answer is A is OK.
upvoted 1 times
...
...
TNT87
1 year, 4 months ago
https://cloud.google.com/storage/docs/folders#overview Answer A
upvoted 3 times
...
sahith24
1 year, 4 months ago
Answer?
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago