diff --git a/README.md b/README.md index 13865c266..c7b571f44 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ file = directory.files.create(key: 'user/1/Gemfile', body: File.open('Gemfile'), directory = s3.directories.get('gaudi-portal-dev', prefix: 'user/1/') directory.files ``` +**Warning!** `s3.directories.get` retrieves and caches meta data for the first 10,000 objects in the bucket, which can be very expensive. When possible use `s3.directories.new`. #### Generating a URL for a file: diff --git a/lib/fog/aws/models/storage/directories.rb b/lib/fog/aws/models/storage/directories.rb index 64341509a..43c9741d5 100644 --- a/lib/fog/aws/models/storage/directories.rb +++ b/lib/fog/aws/models/storage/directories.rb @@ -11,6 +11,7 @@ module Fog load(data) end + # Warning! This retrieves and caches meta data for the first 10,000 objects in the bucket, which can be very expensive. When possible use directories.new def get(key, options = {}) remap_attributes(options, { :delimiter => 'delimiter',