class SFML::Network::Ftp::Response::DirectoryResponse
Returned by working_directory and create_directory — adds the directory accessor on top of Response.
Public Class Methods
Source
# File lib/sfml/network/ftp.rb, line 183 def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpDirectoryResponse_destroy))) obj end
@!visibility private
Public Instance Methods
Source
# File lib/sfml/network/ftp.rb, line 177 def message = C::Network.sfFtpDirectoryResponse_getMessage(@handle).to_s # Returns the directory. def directory = C::Network.sfFtpDirectoryResponse_getDirectory(@handle).to_s attr_reader :handle # :nodoc: # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpDirectoryResponse_destroy))) obj end end # Returned by directory_listing — adds the `#names` array. class ListingResponse # `true` if ok. def ok? = C::Network.sfFtpListingResponse_isOk(@handle) # Returns the status. def status = C::Network.sfFtpListingResponse_getStatus(@handle) # Returns the status symbol. def status_symbol = STATUS_NAMES[status] || status # Returns the message. def message = C::Network.sfFtpListingResponse_getMessage(@handle).to_s # Returns the count. def count = C::Network.sfFtpListingResponse_getCount(@handle) attr_reader :handle # :nodoc: # Filenames returned by the listing, as an Array of Strings. def names Array.new(count) { |i| C::Network.sfFtpListingResponse_getName(@handle, i).to_s } end # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpListingResponse_destroy))) obj end end
Source
# File lib/sfml/network/ftp.rb, line 171 def ok? = C::Network.sfFtpDirectoryResponse_isOk(@handle) # Returns the status. def status = C::Network.sfFtpDirectoryResponse_getStatus(@handle) # Returns the status symbol. def status_symbol = STATUS_NAMES[status] || status # Returns the message. def message = C::Network.sfFtpDirectoryResponse_getMessage(@handle).to_s # Returns the directory. def directory = C::Network.sfFtpDirectoryResponse_getDirectory(@handle).to_s attr_reader :handle # :nodoc: # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpDirectoryResponse_destroy))) obj end end # Returned by directory_listing — adds the `#names` array. class ListingResponse # `true` if ok. def ok? = C::Network.sfFtpListingResponse_isOk(@handle) # Returns the status. def status = C::Network.sfFtpListingResponse_getStatus(@handle) # Returns the status symbol. def status_symbol = STATUS_NAMES[status] || status # Returns the message. def message = C::Network.sfFtpListingResponse_getMessage(@handle).to_s # Returns the count. def count = C::Network.sfFtpListingResponse_getCount(@handle) attr_reader :handle # :nodoc: # Filenames returned by the listing, as an Array of Strings. def names Array.new(count) { |i| C::Network.sfFtpListingResponse_getName(@handle, i).to_s } end # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpListingResponse_destroy))) obj
true if ok.
Source
# File lib/sfml/network/ftp.rb, line 173 def status = C::Network.sfFtpDirectoryResponse_getStatus(@handle) # Returns the status symbol. def status_symbol = STATUS_NAMES[status] || status # Returns the message. def message = C::Network.sfFtpDirectoryResponse_getMessage(@handle).to_s # Returns the directory. def directory = C::Network.sfFtpDirectoryResponse_getDirectory(@handle).to_s attr_reader :handle # :nodoc: # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpDirectoryResponse_destroy))) obj end end # Returned by directory_listing — adds the `#names` array. class ListingResponse # `true` if ok. def ok? = C::Network.sfFtpListingResponse_isOk(@handle) # Returns the status. def status = C::Network.sfFtpListingResponse_getStatus(@handle) # Returns the status symbol. def status_symbol = STATUS_NAMES[status] || status # Returns the message. def message = C::Network.sfFtpListingResponse_getMessage(@handle).to_s # Returns the count. def count = C::Network.sfFtpListingResponse_getCount(@handle) attr_reader :handle # :nodoc: # Filenames returned by the listing, as an Array of Strings. def names Array.new(count) { |i| C::Network.sfFtpListingResponse_getName(@handle, i).to_s } end # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpListingResponse_destroy))) obj end
Source
# File lib/sfml/network/ftp.rb, line 175 def status_symbol = STATUS_NAMES[status] || status # Returns the message. def message = C::Network.sfFtpDirectoryResponse_getMessage(@handle).to_s # Returns the directory. def directory = C::Network.sfFtpDirectoryResponse_getDirectory(@handle).to_s attr_reader :handle # :nodoc: # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpDirectoryResponse_destroy))) obj end end # Returned by directory_listing — adds the `#names` array. class ListingResponse # `true` if ok. def ok? = C::Network.sfFtpListingResponse_isOk(@handle) # Returns the status. def status = C::Network.sfFtpListingResponse_getStatus(@handle) # Returns the status symbol. def status_symbol = STATUS_NAMES[status] || status # Returns the message. def message = C::Network.sfFtpListingResponse_getMessage(@handle).to_s # Returns the count. def count = C::Network.sfFtpListingResponse_getCount(@handle) attr_reader :handle # :nodoc: # Filenames returned by the listing, as an Array of Strings. def names Array.new(count) { |i| C::Network.sfFtpListingResponse_getName(@handle, i).to_s } end # @!visibility private def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpListingResponse_destroy))) obj end end