Class: Distillery::ROM::Path Abstract
- Inherits:
-
Object
- Object
- Distillery::ROM::Path
- Defined in:
- lib/distillery/rom/path.rb,
lib/distillery/rom/path/file.rb,
lib/distillery/rom/path/archive.rb,
lib/distillery/rom/path/virtual.rb
Overview
Abstract class used for ROM path
Defined Under Namespace
Classes: Archive, File, Virtual
Instance Method Summary collapse
-
#basename ⇒ String
Get path basename.
-
#copy(to, length = nil, offset = 0, force: false, link: :hard) ⇒ Boolean
Copy ROM content to the filesystem, possibly using link if requested.
-
#delete! ⇒ Boolean
Delete physical content.
-
#entry ⇒ String
Entry.
-
#file ⇒ String
File directly accessible on the file system.
-
#reader {|io| ... } ⇒ Object
ROM reader.
-
#rename(path, force: false) ⇒ Boolean
Rename ROM and physical content.
-
#storage ⇒ String
File or directory that is considered the storage space for entries.
-
#to_s ⇒ String
Path value as string.
Instance Method Details
#basename ⇒ String
Get path basename
48 49 50 |
# File 'lib/distillery/rom/path.rb', line 48 def basename raise NotImplementedError end |
#copy(to, length = nil, offset = 0, force: false, link: :hard) ⇒ Boolean
Copy ROM content to the filesystem, possibly using link if requested.
75 76 77 |
# File 'lib/distillery/rom/path.rb', line 75 def copy(to, length = nil, offset = 0, force: false, link: :hard) raise NotImplementedError end |
#delete! ⇒ Boolean
Delete physical content.
98 99 100 |
# File 'lib/distillery/rom/path.rb', line 98 def delete! raise NotImplementedError end |
#entry ⇒ String
Entry
39 40 41 |
# File 'lib/distillery/rom/path.rb', line 39 def entry raise NotImplementedError end |
#file ⇒ String
File directly accessible on the file system
21 22 23 |
# File 'lib/distillery/rom/path.rb', line 21 def file raise NotImplementedError end |
#reader {|io| ... } ⇒ Object
Can be costly, prefer existing #copy if possible
ROM reader
60 61 62 |
# File 'lib/distillery/rom/path.rb', line 60 def reader(&block) raise NotImplementedError end |
#rename(path, force: false) ⇒ Boolean
Renaming could lead to silent removing if same ROM is on its way
Rename ROM and physical content.
89 90 91 |
# File 'lib/distillery/rom/path.rb', line 89 def rename(path, force: false) raise NotImplementedError end |
#storage ⇒ String
File or directory that is considered the storage space for entries
30 31 32 |
# File 'lib/distillery/rom/path.rb', line 30 def storage raise NotImplementedError end |
#to_s ⇒ String
Path value as string.
13 14 15 |
# File 'lib/distillery/rom/path.rb', line 13 def to_s raise NotImplementedError end |