Class: Ftpd::ReadOnlyDiskFileSystem

Inherits:
Object
  • Object
show all
Includes:
DiskFileSystem::Base, DiskFileSystem::List, DiskFileSystem::Read
Defined in:
lib/ftpd/disk_file_system.rb

Overview

A disk file system that does not allow any modification (writes, deletes, etc.)

Instance Method Summary collapse

Methods included from DiskFileSystem::Read

#read

Methods included from TranslateExceptions

included, #translate_exception

Methods included from DiskFileSystem::List

#dir, #file_info

Methods included from DiskFileSystem::PathExpansion

#expand_ftp_path, #set_data_dir

Methods included from DiskFileSystem::Accessors

#accessible?, #directory?, #exists?

Constructor Details

#initialize(data_dir) ⇒ ReadOnlyDiskFileSystem

Make a new instance to serve a directory. data_dir should be an absolute path.



429
430
431
432
# File 'lib/ftpd/disk_file_system.rb', line 429

def initialize(data_dir)
  set_data_dir data_dir
  translate_exception SystemCallError
end