lib/azure/armrest/model/storage_account.rb
# Returns a list of files for the specified file-share. You may also
# optionally specify a +directory+ in "share/directory" format.
#
# You may specify multiple +options+ to limit the result set. The
# possible options are:
#
# * prefix
# * marker
# * maxresults
# * timeout
# * all
#
# If the :all option is set to true, then this method will collect all
# records. Otherwise, it is capped at 5000 records by Azure, or whatever
# you set :maxresults to. If you set both the :all option and the :maxresults
# option, then all records will be collected in :maxresults batches.
#
Returns a list of files for the specified file-share. You may also
optionally specify a +directory+ in "share/directory" format.

You may specify multiple +options+ to limit the result set. The
possible options are.

prefix
marker
maxresults
timeout
all

If the :all option is set to true, then this method will collect all
records. Otherwise, it is capped at 5000 records by Azure, or whatever
you set :maxresults to. If you set both the :all option and the :maxresults
option, then all records will be collected in :maxresults batches.
Returns a list of files for the specified file - share . You may also optionally specify a + directory + in " share / directory " format . You may specify multiple + options + to limit the result set . The possible options are . prefix marker maxresults timeout all If the : all option is set to true then this method will collect all records . Otherwise it is capped at 5000 records by Azure or whatever you set : maxresults to . If you set both the : all option and the : maxresults option then all records will be collected in : maxresults batches .
def files(share, key = access_key, options = {})
        raise ArgumentError, "No access key specified" unless key
        query = "comp=list&restype=directory"
        skip_defs = options[:skip_accessors_definition]
        options.each do |okey, ovalue|
          unless okey == :skip_accessors_definition
            query += "&#{okey}=#{[ovalue].flatten.join(',')}"
          end
        end
        response = file_response(key, query, 'get', nil, share)
        hash = Hash.from_xml(response.body)['EnumerationResults']['Entries']
        results = []
        if hash && hash['Directory']
          Array.wrap(hash['Directory']).each { |dir| results << ShareDirectory.new(dir, skip_defs) }
        end
        if hash && hash['File']
          Array.wrap(hash['File']).each { |file| results << ShareFile.new(file, skip_defs) }
        end
        if options[:all] && hash['NextMarker']
          options[:marker] = hash['NextMarker']
          results.concat(files(share, key, options))
        end
        results
      end
def files ( share , key = access_key , options = { } ) raise ArgumentError , "No access key specified" unless key query = "comp=list&restype=directory" skip_defs = options [ :skip_accessors_definition ] options . each do | okey , ovalue | unless okey == :skip_accessors_definition query += "&#{okey}=#{[ovalue].flatten.join(',')}" end end response = file_response ( key , query , 'get' , nil , share ) hash = Hash . from_xml ( response . body ) [ 'EnumerationResults' ] [ 'Entries' ] results = [ ] if hash && hash [ 'Directory' ] Array . wrap ( hash [ 'Directory' ] ) . each { | dir | results << ShareDirectory . new ( dir , skip_defs ) } end if hash && hash [ 'File' ] Array . wrap ( hash [ 'File' ] ) . each { | file | results << ShareFile . new ( file , skip_defs ) } end if options [ :all ] && hash [ 'NextMarker' ] options [ :marker ] = hash [ 'NextMarker' ] results . concat ( files ( share , key , options ) ) end results end
Returns a list of files for the specified file-share.
Returns a list of files for the specified file - share .
share
<not_specific>
key
<not_specific>
access_key
<not_specific>
options
<not_specific>