Sha256: 630613c8852bd4c5cd2dabafe8be04c216a4bd6777397a78489f59e35ab605bd

Contents?: true

Size: 684 Bytes

Versions: 12

Compression:

Stored size: 684 Bytes

Contents

module Fog
  module Rackspace
    class Files

      class Directory < Fog::Model

        identity  :name

        attribute :bytes
        attribute :count

        def destroy
          requires :name
          connection.delete_container(@name)
          true
        rescue Excon::Errors::NotFound
          false
        end

        def files
          @files ||= begin
            Fog::Rackspace::Files::Files.new(
              :directory    => self,
              :connection   => connection
            )
          end
        end

        def save
          requires :name
          connection.put_container(@name)
          true
        end

      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fog-0.0.58 lib/fog/rackspace/models/files/directory.rb
fog-0.0.57 lib/fog/rackspace/models/files/directory.rb
fog-0.0.56 lib/fog/rackspace/models/files/directory.rb
fog-0.0.55 lib/fog/rackspace/models/files/directory.rb
fog-0.0.54 lib/fog/rackspace/models/files/directory.rb
fog-0.0.53 lib/fog/rackspace/models/files/directory.rb
fog-0.0.52 lib/fog/rackspace/models/files/directory.rb
fog-0.0.51 lib/fog/rackspace/models/files/directory.rb
fog-0.0.50 lib/fog/rackspace/models/files/directory.rb
fog-0.0.49 lib/fog/rackspace/models/files/directory.rb
fog-0.0.48 lib/fog/rackspace/models/files/directory.rb
fog-0.0.47 lib/fog/rackspace/models/files/directory.rb