Class: Terminalwire::V2::Server::Context::Directory

Inherits:
Object
  • Object
show all
Defined in:
lib/terminalwire/v2/server/context.rb

Instance Method Summary collapse

Constructor Details

#initialize(runtime) ⇒ Directory

Returns a new instance of Directory.



237
# File 'lib/terminalwire/v2/server/context.rb', line 237

def initialize(runtime) = @runtime = runtime

Instance Method Details

#create(path) ⇒ Object



240
# File 'lib/terminalwire/v2/server/context.rb', line 240

def create(path)        = @runtime.request(:directory, :create, { "path" => path.to_s })

#delete(path) ⇒ Object



242
# File 'lib/terminalwire/v2/server/context.rb', line 242

def delete(path)        = @runtime.request(:directory, :delete, { "path" => path.to_s })

#exist?(path) ⇒ Boolean

Returns:

  • (Boolean)


241
# File 'lib/terminalwire/v2/server/context.rb', line 241

def exist?(path)        = @runtime.request(:directory, :exist, { "path" => path.to_s })

#list(path) ⇒ Object Also known as: ls



238
# File 'lib/terminalwire/v2/server/context.rb', line 238

def list(path)          = @runtime.request(:directory, :list, { "path" => path.to_s })