module PathMapper::Node::Null::File

Public Instance Methods

_append_line!(line) click to toggle source
# File lib/path_mapper/node/null/file.rb, line 24
def _append_line!(line)
  { d: { result: self.put!(line, logger: false), diff: self.custom_diff(nil, with_line_separator(line)) }, code: :created }
end
_create!() click to toggle source
# File lib/path_mapper/node/null/file.rb, line 5
def _create!
  self.with_dry_run do |dry_run|
    if dry_run
      self.storage_tree(@path)
    else
      @path.mkpath
    end
  end
  { d: { result: self._create_node(@path) }, code: :created }
end
_delete!(full: false) click to toggle source
# File lib/path_mapper/node/null/file.rb, line 28
def _delete!(full: false)
  { d: { result: self }, code: :ok }
end
_put!(content) click to toggle source
# File lib/path_mapper/node/null/file.rb, line 16
def _put!(content)
  { d: { result: self._file_puts(content), diff: self.custom_diff(nil, with_line_separator(content)) }, code: :created }
end
_remove!(content) click to toggle source
# File lib/path_mapper/node/null/file.rb, line 32
def _remove!(content)
  { d: { result: self }, code: :ok }
end
_rename!(new_path) click to toggle source
# File lib/path_mapper/node/null/file.rb, line 36
def _rename!(new_path)
  { d: { result: self._create_node(new_path) }, code: :ok }
end
_safe_put!(content) click to toggle source
# File lib/path_mapper/node/null/file.rb, line 20
def _safe_put!(content)
  { d: { result: self.put!(content, logger: false), diff: self.custom_diff(nil, with_line_separator(content)) }, code: :created }
end
md5() click to toggle source
# File lib/path_mapper/node/null/file.rb, line 40
def md5
  nil
end