Class: Terminalwire::Server::Resource::File
- Defined in:
- lib/terminalwire/server/resource.rb
Instance Method Summary collapse
- #append(path, content) ⇒ Object
- #change_mode(path, mode) ⇒ Object (also: #chmod)
- #delete(path) ⇒ Object (also: #rm)
- #exist?(path) ⇒ Boolean
- #read(path) ⇒ Object
- #write(path, content) ⇒ Object
Instance Method Details
#append(path, content) ⇒ Object
74 75 76 |
# File 'lib/terminalwire/server/resource.rb', line 74 def append(path, content) command("append", path: path.to_s, content:) end |
#change_mode(path, mode) ⇒ Object Also known as: chmod
87 88 89 |
# File 'lib/terminalwire/server/resource.rb', line 87 def change_mode(path, mode) command("change_mode", path: path.to_s, mode:) end |
#delete(path) ⇒ Object Also known as: rm
78 79 80 |
# File 'lib/terminalwire/server/resource.rb', line 78 def delete(path) command("delete", path: path.to_s) end |
#exist?(path) ⇒ Boolean
83 84 85 |
# File 'lib/terminalwire/server/resource.rb', line 83 def exist?(path) command("exist", path: path.to_s) end |
#read(path) ⇒ Object
66 67 68 |
# File 'lib/terminalwire/server/resource.rb', line 66 def read(path) command("read", path: path.to_s) end |
#write(path, content) ⇒ Object
70 71 72 |
# File 'lib/terminalwire/server/resource.rb', line 70 def write(path, content) command("write", path: path.to_s, content:) end |