Home

cstrahan edited this page May 30, 2011 · 1 revision
Clone this wiki locally

Welcome to the RAPI project.

How to install RAPI

gem install rapi

How To Use RAPI

require 'rapi'

# Create a new RAPI session
device = RAPI.new
device.connect

# Enumerate some files/directories
some_file = device.glob("\\SDMMCDisk\\*").first

# Move/delete/copy/download/upload
device.copy some_file.name, some_file.name + ".backup"
device.move some_file.name, "\\SDMMCDisk\\some_other_file_name"
device.download some_file.name, "C:\\Users\\Charles\\Desktop\\local_copy"
device.upload "C:\\Users\\Charles\\Desktop\\local_copy", "\\SDMMCDisk\\some_other_file_name", true # overwrite existing
device.delete some_file.name

# Create a process
device.exec "explorer.exe"

# Disconnect
device.disconnect

Contributing

These things would be awesome to have: