Module: Ftpd::DiskFileSystem::PathExpansion
- Included in:
- Base
- Defined in:
- lib/ftpd/disk_file_system.rb
Overview
DiskFileSystem mixin for path expansion. Used by every command that accesses the disk file system.
Instance Method Summary collapse
-
#expand_ftp_path(ftp_path) ⇒ Object
Expand an ftp_path to an absolute file system path.
-
#set_data_dir(data_dir) ⇒ Object
Set the data directory, the root of the disk file system.
Instance Method Details
#expand_ftp_path(ftp_path) ⇒ Object
Expand an ftp_path to an absolute file system path.
ftp_path is an absolute path relative to the FTP file system. The return value is an absolute path relative to the disk file system.
27 28 29 |
# File 'lib/ftpd/disk_file_system.rb', line 27 def (ftp_path) File.(File.join(@data_dir, ftp_path)) end |
#set_data_dir(data_dir) ⇒ Object
Set the data directory, the root of the disk file system. data_dir should be an absolute path.
17 18 19 |
# File 'lib/ftpd/disk_file_system.rb', line 17 def set_data_dir(data_dir) @data_dir = data_dir end |