Method: Pcloud::Folder#contents

Defined in:
lib/pcloud/folder.rb

#contentsObject

Some APIs return ‘nil` or `[]` for contents when a folder does actually have contents. This method allows us to re-try one time if we try to get the contents and find that they’re missing.



68
69
70
71
72
73
# File 'lib/pcloud/folder.rb', line 68

def contents
  return @contents if @contents_are_confirmed
  @contents = Folder.find(id).contents
  @contents_are_confirmed = true
  @contents
end