module FtpParadise
#¶ ↑
require 'ftp_paradise/base/cliner.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/base/colours.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/base/reset.rb'
#¶ ↑
#¶ ↑
This file will add colour-related methods to the ftp_paradise project.
#¶ ↑
require 'ftp_paradise/colours/colours.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/colours/use_colours.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/configuration/configuration.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/constants.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/data.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/debug.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/directory_handling.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/do_login.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/download.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/file_handling.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/ftp_object.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/initialize.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/initialize_a_new_net_ftp_object_with_this_url.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/is_connected.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/misc.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/notify.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/password.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/port.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/remote_pwd.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/remote_url.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/remove.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/reset.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/run.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/set_array_available_hosts.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/set_input.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/show.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/sync_ftp_object_onto_the_main_namespace.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/transfer_mode.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/upload.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/use_default_dataset.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/connection/username.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/constants/constants.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/constants/misc.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/constants/namespace.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/constants/newline.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/constants/roebe.rb' FILE_ROEBE_FTP
HOME_DIRECTOY_OF_USER_X
#¶ ↑
#¶ ↑
require 'ftp_paradise/constants/roebe_ftp_constants.rb' include FtpParadise::RoebeFtpConstants
#¶ ↑
#¶ ↑
FtpParadise::Entry
¶ ↑
This class is sort of similar to class Net::FTP::List::Entry.
We want to parse a FTP entry into corresponding slots on the object.
The input should be an individual line from a remote Net::FTP object.
The output would be an object such as:
<FtpParadise::Entry:0x000055561f61b370 @basename="usher-0.0.12.gem", @filesize=2048, @mtime=2014-10-25 00:00:00 +0200, @raw="-rw-r--r-- 1 330 330 6144 Dec 27 2015 usher-0.0.12.gem", @server_type="Unix", @symlink=false, @dir=true, @file=false, @device=false, @splitted=["-rw-r--r--", "1", "330", "330", "6144", "Dec", "27", "2015", "usher-0.0.12.gem"]
#¶ ↑
require 'ftp_paradise/entry/entry.rb' FtpParadise::Entry.new
#¶ ↑
#¶ ↑
FtpParadise::GUI::Gtk::FtpParadiseModule
¶ ↑
The purpose of this class is to provide a GTK-FTP Client, loosely modelled after the client called “gftp”.
#¶ ↑
require 'ftp_paradise/gui/shared_code/ftp_paradise/ftp_paradise_module.rb' include ::FtpParadise::GUI::Gtk::FtpParadiseModule
#¶ ↑
#¶ ↑
All constants for class Interactive shall be stored in this file here.
#¶ ↑
require 'ftp_paradise/interactive_ftp/constants.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/directory_handling.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/help.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/initialize.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/main_loop.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/menu.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/misc.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/mode.rb'
#¶ ↑
#¶ ↑
The Readline component will belong to class FtpParadise::InteractiveFtp
.
It would not make any sense to use it elsewhere within the FtpParadise
project, as we don't have other interactive elements elsewhere.
#¶ ↑
require 'ftp_paradise/interactive_ftp/readline.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/remove.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/reset.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/run.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/show.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/upload.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/interactive_ftp/user_input.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/project/project.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/requires/require_the_toplevel_methods.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/can_connect_to_remote_site.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/clear_user_dataset.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/connect.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/data.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/determine_user_dataset_from_this_hash.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/directory_related_actions.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/e.rb'
#¶ ↑
#¶ ↑
require 'file_related_actions.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/ftp_object.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/is_on_roebe.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/login_name.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/misc.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/opn.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/password.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/port.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/rds.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/remote_url.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/time.rb'
#¶ ↑
#¶ ↑
require 'ftp_paradise/toplevel_methods/upload_and_download.rb' FtpParadise.download
#¶ ↑
#¶ ↑
require 'ftp_paradise/version/version.rb'
#¶ ↑
Constants
- ARRAY_BINARY_FILES
#¶ ↑
ARRAY_BINARY_FILES
¶ ↑Just note down the extension names.
#¶ ↑
- ARRAY_HELP_OPTIONS
#¶ ↑
ARRAY_HELP_OPTIONS
¶ ↑This Array is only required in the interactive variant though.
#¶ ↑
- ARRAY_VALID_OPTIONS_FOR_EXITING_THE_SHELL
#¶ ↑
ARRAY_VALID_OPTIONS_FOR_EXITING_THE_SHELL
¶ ↑#¶ ↑
- FILE_AUTOMATICALLY_CONNECT_ON_STARTUP_OF_THE_INTERACTIVE_FTP_SHELL
#¶ ↑
FtpParadise::FILE_AUTOMATICALLY_CONNECT_ON_STARTUP_OF_THE_INTERACTIVE_FTP_SHELL
¶ ↑#¶ ↑
- FILE_ROEBE_FTP
#¶ ↑
FILE_ROEBE_FTP
¶ ↑In theory you could change this if you use a similar .yml file.
This will, on my home directory, expand to:
/home/x/DATA/PC/OS/LINUX/FTP/YAML/roebe_ftp.yml
#¶ ↑
- HOME_DIRECTORY_OF_USER_X
#¶ ↑
HOME_DIRECTORY_OF_USER_X
¶ ↑This is also only useful on my home setup.
#¶ ↑
- N
#¶ ↑
N
¶ ↑#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
- PROJECT_BASE_DIRECTORY
- PROJECT_YAML_DIRECTORY
#¶ ↑
PROJECT_YAML_DIRECTORY
¶ ↑This constant specifies where the project-specific yaml/ directory will be kept at for the ftp_paradise project. Ideally you should use the method rather than this constant, though.
#¶ ↑
- SHALL_WE_DEBUG
#¶ ↑
SHALL_WE_DEBUG
¶ ↑#¶ ↑
- VERSION
#¶ ↑
VERSION
¶ ↑#¶ ↑
- YAML_DIRECTORY
Public Class Methods
#¶ ↑
FtpParadise.can_connect_to_remote_site?
¶ ↑
This method can be used to query whether we can connect to a remote website via the FtpParadise
project.
The method will return a boolean: either true or false.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/can_connect_to_remote_site.rb, line 17 def self.can_connect_to_remote_site? require 'ftp_paradise/connection/connection.rb' ftp = FtpParadise::Connection.new(:dont_run_yet) { :use_default_dataset } ftp.be_quiet return ftp.is_connected? end
#¶ ↑
FtpParadise.clear_user_dataset
¶ ↑
This method will reset the user-dataset to nil again, that is, user name, password and remote url.
This method had to be added so that we can easily clean-up on a disconnect-action.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/clear_user_dataset.rb, line 22 def self.clear_user_dataset FtpParadise.set_remote_url(nil) FtpParadise.set_user_name(nil) FtpParadise.set_password(nil) end
#¶ ↑
FtpParadise.connect
¶ ↑
To use this convenient connection-method, do this:
_ = FtpParadise.connect to: :shevy
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/connect.rb, line 17 def self.connect( where_to = {} ) if where_to.is_a? Hash require 'ftp_paradise/connection/connection.rb' FtpParadise::Connection.new(where_to) # This ought to be a Hash anyway. end end
#¶ ↑
FtpParadise.data?
¶ ↑
This method will return the name of the user; the password; and the remote URL. It is mostly just a convenience method.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/data.rb, line 19 def self.data? { user_name: FtpParadise.username?, password: FtpParadise.password?, remote_url: FtpParadise.remote_url? } end
#¶ ↑
FtpParadise.delete
(del tag)¶ ↑
Consistently use this method if you wish to delete a (local) file.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/file_related_actions.rb, line 40 def self.delete(i) # ← Added this method as of April 2014. i = i.to_s # We don't want nil-errors here. if File.exist? i File.delete(i) else e "No file at #{sfile(i)} appears to exist." end end
#¶ ↑
FtpParadise.determine_user_dataset_from_this_hash
¶ ↑
This method can set relevant entries from an input Hash.
The IDs should be 'url', 'user_name' and 'password'.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/determine_user_dataset_from_this_hash.rb, line 20 def self.determine_user_dataset_from_this_hash(i) if i.is_a? Hash if i.has_key? 'url' _ = i.fetch('url') FtpParadise.set_remote_url(_) end if i.has_key? 'user_name' _ = i.fetch('user_name') FtpParadise.set_user_name(_) end if i.has_key? 'password' _ = i.fetch('password') FtpParadise.set_password(_) end end end
#¶ ↑
FtpParadise.do_login
(login tag)¶ ↑
This method combines setting the remote URL, before doing the login action.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/ftp_object.rb, line 50 def self.do_login( use_this_as_the_remote_url = nil, user = :default, passwd = :default_or_nil, acct = nil ) if use_this_as_the_remote_url and FtpParadise.ftp_object?.nil? FtpParadise.set_remote_url(use_this_as_the_remote_url) end case use_this_as_the_remote_url # ======================================================================= # # === :bytehost # ======================================================================= # when :bytehost FtpParadise.set_remote_url(:infer) use_this_as_the_remote_url = remote_url? end # ======================================================================= # # Sanitize the default user (user name aka login name). # ======================================================================= # case user # ======================================================================= # # === :default # ======================================================================= # when :default if is_on_roebe? set_login_name(:infer) user = login_name? else user = 'anonymous' end end # ======================================================================= # # Sanitize the given password next. # ======================================================================= # case passwd # ======================================================================= # # === :default_or_nil # ======================================================================= # when :default_or_nil if is_on_roebe? set_password(:infer) passwd = password? else passwd = nil end end # ======================================================================= # # puts "Debug: user name is: #{user} password is: #{passwd} account is: #{acct}" # ======================================================================= # @ftp_object.login( user, passwd, acct ) # Delegate to the main object here. return @ftp_object # And mandatory return here. end
#¶ ↑
FtpParadise.do_start_gui
¶ ↑
This will output what will be done, then start the GUI
bindings.
This method can be invoked via:
ftpparadise --gui
#¶ ↑
# File lib/ftp_paradise/gui/shared_code/ftp_paradise/ftp_paradise_module.rb, line 687 def self.do_start_gui opnn; puts 'We will next start the GUI.' FtpParadise::GUI::Gtk::FtpParadiseModule.start_gtk end
#¶ ↑
FtpParadise.get_files
¶ ↑
Use this method whenever you want to get all (local) files.
By default, this method will return all files from the current directory.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/file_related_actions.rb, line 18 def self.get_files( from = '*' ) entries = Dir[from] entries.select! {|entry| File.file?(entry) } entries end
#¶ ↑
FtpParadise.initialize
¶ ↑
This method will assign to the general configuration object stored in the variable @configuration.
#¶ ↑
# File lib/ftp_paradise/configuration/configuration.rb, line 26 def self.initialize if Object.const_defined? :Roebe # ===================================================================== # # Load up all .yml files from the path to the yaml directory: # ===================================================================== # @configuration = ::Roebe::Configuration::Configuration.new(FtpParadise.yaml_directory?) end end
#¶ ↑
FtpParadise.initialize_ftp_object
¶ ↑
Use this method if you wish to initialize a new FTP object. This will be, by default, a blank-state initializer.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/ftp_object.rb, line 33 def self.initialize_ftp_object(use_this_url = nil) case use_this_url # ======================================================================= # # === :default # ======================================================================= # when :default use_this_url = YAML.load_file(FILE_ROEBE_FTP)['podserver']['url'] end @ftp_object = Net::FTP.new(use_this_url) end
#¶ ↑
FtpParadise.is_directory?
¶ ↑
This will return a boolean - true if the remote target is a directory and false otherwise.
By default this method will connect to the :shevy host.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/directory_related_actions.rb, line 17 def self.is_directory?( i, connect_to_this_host = :shevy ) require 'ftp_paradise/connection/connection.rb' FtpParadise::Connection.new( i, connect_to_this_host: connect_to_this_host ).is_a_directory?(i) end
#¶ ↑
FtpParadise.mlsd
¶ ↑
This method will return an Array of the entries of the directory specified by pathname.
Each entry has the facts (e.g., size, last modification time, etc.) and the pathname. If a block is given, it iterates through the listing.
If pathname is omitted, the current directory is assumed.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/ftp_object.rb, line 141 def self.mlsd( pathname = nil ) @ftp_object.mlsd(pathname) end
#¶ ↑
FtpParadise.new
¶ ↑
Module-method to create a new Connection
object.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/connect.rb, line 31 def self.new( remote_host = :default, run_already = FtpParadise::Connection::RUN_ALREADY, &block ) case remote_host when :dont_run_yet remote_host = :default run_already = false end if remote_host.is_a? Symbol run_already = remote_host end require 'ftp_paradise/connection/connection.rb' FtpParadise::Connection.new( remote_host, run_already, &block ) end
#¶ ↑
FtpParadise.project_yaml_dir?
¶ ↑
This method here must be defined before FtpParadise.initialize()
is to be invoked.
#¶ ↑
# File lib/ftp_paradise/project/project.rb, line 48 def self.project_yaml_dir? "#{PROJECT_BASE_DIRECTORY}yaml/" end
#¶ ↑
FtpParadise.remote_mkdir
¶ ↑
This method will create a remote directory. Make sure to have a valid (active) FTP connection before you invoke this method.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/ftp_object.rb, line 224 def self.remote_mkdir( create_this_remote_directory, connection = @ftp_object, connect_to_this_host = :shevy ) if create_this_remote_directory.is_a? Array create_this_remote_directory.each {|name_of_the_remote_directory| remote_mkdir( name_of_the_remote_directory, connection, connect_to_this_host ) } else create_this_remote_directory = create_this_remote_directory.to_s if connection.nil? require 'ftp_paradise/connection/connection.rb' connection = FtpParadise::Connection.new(connect_to_this_host) { :do_not_run_yet } connection.be_silent connection.do_login end begin connection.mkdir(create_this_remote_directory) rescue Net::FTPPermError => error pp error e "No directory called #{create_this_remote_directory}/ could be created" e 'as such a (remote) directory already exists.' end end end
#¶ ↑
FtpParadise.set_login_name
¶ ↑
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/login_name.rb, line 27 def self.set_login_name( i = :try_to_infer_automatically ) case i # ======================================================================= # # === :try_to_infer_automatically # ======================================================================= # when :try_to_infer_automatically, :infer if File.exist? FILE_ROEBE_FTP i = YAML.load_file(FILE_ROEBE_FTP)['podserver']['user_name'] end end @login_name = i end
#¶ ↑
FtpParadise.set_password
¶ ↑
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/password.rb, line 31 def self.set_password( i = :try_to_infer_automatically ) case i # === :try_to_infer_automatically when :try_to_infer_automatically, :infer if File.exist? FILE_ROEBE_FTP i = YAML.load_file(FILE_ROEBE_FTP)['bytehost']['password'] end end @password = i end
#¶ ↑
FtpParadise.set_remote_url
¶ ↑
Setter-method for @remote_url. Will be nil initially.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/remote_url.rb, line 33 def self.set_remote_url( i = :try_to_infer ) case i when nil, :infer, :try_to_infer if is_on_roebe? if File.exist? FILE_ROEBE_FTP i = YAML.load_file(FILE_ROEBE_FTP)['bytehost']['url'] end end end @remote_url = i end
#¶ ↑
FtpParadise.testing_colours
(colour test, testing colours)¶ ↑
This just is a test whether we use colours or whether we won't.
#¶ ↑
# File lib/ftp_paradise/colours/colours.rb, line 131 def self.testing_colours e 'We will now test some colours.' e "Will we use colours? #{FtpParadise.use_colours?.to_s}" e 'Testing '+sfancy('sfancy')+' next.' end
#¶ ↑
FtpParadise.upload
¶ ↑
This toplevel-method can be used to upload something to a remote target.
The second argument called `to` will tell us where to upload to.
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/upload_and_download.rb, line 84 def self.upload( local_target, remote_target = :short_variant, use_this_ftp_object = :shevy, &block ) case remote_target when :short_variant remote_target = File.basename(local_target) end if use_this_ftp_object.is_a? Symbol require 'ftp_paradise/connection/connection.rb' use_this_ftp_object = FtpParadise::Connection.new(:dont_run_yet) opn; e "We will now connect to #{sfancy(use_this_ftp_object.to_s)}." use_this_ftp_object.connect_to use_this_ftp_object.upload(local_target) end use_this_ftp_object.put( local_target, remotefile = File.basename(localfile), &block ) end
#¶ ↑
FtpParadise.upload_this_binary_file
¶ ↑
This method shall allow you to upload a binary file to a remote host.
For now, this has my FTP information hardcoded.
Usage examples:
FtpParadise.upload_this_binary_file("/home/x/src/htop/htop-2.0.2.tar.xz") FtpParadise.upload_this_binary_file("/home/x/src/htop/htop-2.0.2.tar.xz") {{ cd_into_this_directory: 'htdocs/' }} FtpParadise.upload_this_binary_file("/home/x/src/htop/htop-2.0.2.tar.xz") {{ cd_into_this_directory: 'www/' }} upload_this_binary_file /home/x/src/htop/htop-2.0.2.tar.xz upload_this_binary_file /home/x/src/htop/htop-2.0.2.tar.xz
#¶ ↑
# File lib/ftp_paradise/toplevel_methods/upload_and_download.rb, line 29 def self.upload_this_binary_file( file, be_verbose = :be_silent, use_this_as_ftp_object = nil ) yielded = nil yielded = yield if block_given? case yielded when :be_quiet be_verbose = false end case be_verbose when :be_silent be_verbose = false end unless use_this_as_ftp_object require 'ftp_paradise/connection/connection.rb' use_this_as_ftp_object = ::FtpParadise::Connection.new(:dont_run_yet) { :default_dataset } if be_verbose use_this_as_ftp_object.be_verbose else use_this_as_ftp_object.be_quiet end use_this_as_ftp_object.set_binary_mode end if yielded if yielded.is_a? Hash if yielded.has_key? :cd_into_this_directory use_this_as_ftp_object.remote_cd(yielded[:cd_into_this_directory]) end end end use_this_as_ftp_object.upload(file, be_verbose) # Here, do the FTP upload finally. end
#¶ ↑
FtpParadise.use_colours?
¶ ↑
This can be delegated towards the configuration object.
#¶ ↑
# File lib/ftp_paradise/colours/use_colours.rb, line 30 def self.use_colours? if FtpParadise.respond_to?(:config?) and FtpParadise.config?.respond_to?(:use_colours) FtpParadise.config?.use_colours else true end end