class SFML::Network::Ftp::Response::DirectoryResponse::ListingResponse
Returned by directory_listing — adds the names array.
Public Class Methods
Source
# File lib/sfml/network/ftp.rb, line 211 def self._take_ownership(ptr) obj = allocate obj.instance_variable_set(:@handle, FFI::AutoPointer.new(ptr, C::Network.method(:sfFtpListingResponse_destroy))) obj end
@!visibility private
Public Instance Methods
Source
# File lib/sfml/network/ftp.rb, line 200 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 end
Source
# File lib/sfml/network/ftp.rb, line 206 def names Array.new(count) { |i| C::Network.sfFtpListingResponse_getName(@handle, i).to_s } end
Filenames returned by the listing, as an Array of Strings.
Source
# File lib/sfml/network/ftp.rb, line 194 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 end end
true if ok.
Source
# File lib/sfml/network/ftp.rb, line 196 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 end end end
Source
# File lib/sfml/network/ftp.rb, line 198 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 end end