Class: Yast::TargetFile
- Inherits:
-
Object
- Object
- Yast::TargetFile
- Defined in:
- library/system/src/lib/yast2/target_file.rb
Overview
A file handler suitable for CFA::BaseModel (from config_files_api.gem)
that respects Yast::Installation.destdir. When this class is require
d,
it is assigned to CFA::BaseModel.default_file_handler.
Class Method Summary collapse
-
.read(path) ⇒ Object
Reads file content with respect of changed root in installation.
-
.write(path, content) ⇒ Object
Writes file content with respect of changed root in installation.
Class Method Details
.read(path) ⇒ Object
Reads file content with respect of changed root in installation.
33 34 35 |
# File 'library/system/src/lib/yast2/target_file.rb', line 33 def self.read(path) ::File.read(final_path(path)) end |
.write(path, content) ⇒ Object
Writes file content with respect of changed root in installation.
38 39 40 |
# File 'library/system/src/lib/yast2/target_file.rb', line 38 def self.write(path, content) ::File.write(final_path(path), content) end |