lib/fog/azurerm/models/storage/files.rb in gitlab-fog-azure-rm-1.8.0 vs lib/fog/azurerm/models/storage/files.rb in gitlab-fog-azure-rm-1.9.0
- old
+ new
@@ -1,8 +1,8 @@
module Fog
- module Storage
- class AzureRM
+ module AzureRM
+ class Storage
# This class is giving implementation of listing blobs.
class Files < Fog::Collection
include Fog::AzureRM::Utilities::General
attribute :directory
@@ -10,11 +10,11 @@
attribute :marker, aliases: 'Marker'
attribute :max_results, aliases: %w(max-results MaxResults max_keys MaxKeys max-keys)
attribute :next_marker, aliases: %w(NextMarker next-marker)
attribute :prefix, aliases: 'Prefix'
- model Fog::Storage::AzureRM::File
+ model Fog::AzureRM::Storage::File
# List all files(blobs) under the directory.
#
# required attributes: directory
#
@@ -25,11 +25,11 @@
# as a placeholder for all files whose names begin with the same substring up to the appearance
# of the delimiter character. The delimiter may be a single character or a string.
# @option options [String] marker Sets the identifier that specifies the portion of the list to be returned.
# @option options [String] prefix Sets filters the results to return only files whose name begins with the specified prefix.
#
- # @return [Fog::Storage::AzureRM::Files] Return nil if the directory does not exist.
+ # @return [Fog::AzureRM::Storage::Files] Return nil if the directory does not exist.
#
def all(options = {})
requires :directory
options = {
@@ -50,11 +50,11 @@
load(parent.files.map(&:attributes))
end
# Enumerate every file under the directory if block_given?
#
- # @return [Fog::Storage::AzureRM::Files]
+ # @return [Fog::AzureRM::Storage::Files]
#
alias each_file_this_page each
def each
if block_given?
subset = dup.all
@@ -75,11 +75,11 @@
#
# @param key [String] Name of file
# @param options [Hash]
# @option options [String] block_size Sets buffer size when block_given? is true. Default is 32 MB
#
- # @return [Fog::Storage::AzureRM::File] A file. Return nil if the file does not exist.
+ # @return [Fog::AzureRM::Storage::File] A file. Return nil if the file does not exist.
#
def get(key, options = {}, &block)
requires :directory
blob, content = service.get_blob(directory.key, key, options, &block)
@@ -152,11 +152,11 @@
# required attributes: directory
#
# @param key [String] Name of file
# @param options [Hash]
#
- # @return [Fog::Storage::AzureRM::File] A file. Return nil if the file does not exist.
+ # @return [Fog::AzureRM::Storage::File] A file. Return nil if the file does not exist.
#
def head(key, options = {})
requires :directory
blob = service.get_blob_properties(directory.key, key, options)
@@ -170,10 +170,10 @@
# Create a new file.
#
# required attributes: directory
#
- # @return [Fog::Storage::AzureRM::File] A file. You need to use File.save to upload this new file.
+ # @return [Fog::AzureRM::Storage::File] A file. You need to use File.save to upload this new file.
#
def new(attributes = {})
requires :directory
super({ directory: directory }.merge!(attributes))