class Object

Constants

CURL_COPY
CURL_DELETE
CURL_MKCOL
CURL_MOVE
CURL_OPTIONS
CURL_PROPFIND
CURL_PROPPATCH
CURL_UPLOAD

Public Instance Methods

cd(args) click to toggle source

Change working directory.

Examples:

require 'davclient/simple'

cd("https://example.webdav.org/collection/")
content = get("index.html")
print content
# File lib/davclient/simple.rb, line 21
def cd(args)
  WebDAV.cd(args)
end
find(*args, &block) click to toggle source
# File lib/davclient/simple.rb, line 29
def find(*args, &block)
  WebDAV.find(*args, &block)
end
get(args) click to toggle source
# File lib/davclient/simple.rb, line 41
def get(args)
  WebDAV.get(args)
end
ls(*args) click to toggle source
# File lib/davclient/simple.rb, line 33
def ls(*args)
  if(args == [])
    LsCLI.ls([WebDAV.CWURL])
  else
    LsCLI.ls(*args)
  end
end
pwd() click to toggle source
# File lib/davclient/simple.rb, line 25
def pwd
  WebDAV.CWURL
end
remove_newlines(string) click to toggle source

Used to improve readability of curl commands that always needs to be on one line

# File lib/davclient/curl_commands.rb, line 8
def remove_newlines(string)
  string.gsub("\n","").gsub(/ +/," ") + " "
end