Top Level Namespace
Defined Under Namespace
Modules: Hpricot, WebDAV
Classes: DavCLI, LsCLI, PropfindCLI, PutCLI
Constant Summary
collapse
- CURL_PROPFIND =
remove_newlines(curl_propfind_cmd)
- CURL_PROPPATCH =
remove_newlines(curl_proppatch_cmd)
- CURL_DELETE =
remove_newlines(curl_delete_cmd)
- CURL_MKCOL =
remove_newlines(curl_mkcol_cmd)
- CURL_OPTIONS =
"#{$curl} -i -X OPTIONS --netrc "
- CURL_COPY =
remove_newlines(curl_copy)
- CURL_MOVE =
remove_newlines(curl_move)
Instance Method Summary
collapse
Instance Method Details
#cd(args) ⇒ Object
Change working directory.
Examples:
require 'davclient/simple'
cd("https://example.webdav.org/collection/")
content = get("index.html")
print content
21
22
23
|
# File 'lib/davclient/simple.rb', line 21
def cd(args)
WebDAV.cd(args)
end
|
#find(*args, &block) ⇒ Object
29
30
31
|
# File 'lib/davclient/simple.rb', line 29
def find(*args, &block)
WebDAV.find(*args, &block)
end
|
#get(args) ⇒ Object
41
42
43
|
# File 'lib/davclient/simple.rb', line 41
def get(args)
WebDAV.get(args)
end
|
#ls(*args) ⇒ Object
33
34
35
36
37
38
39
|
# File 'lib/davclient/simple.rb', line 33
def ls(*args)
if(args == [])
LsCLI.ls([WebDAV.CWURL])
else
LsCLI.ls(*args)
end
end
|
#pwd ⇒ Object
25
26
27
|
# File 'lib/davclient/simple.rb', line 25
def pwd
WebDAV.CWURL
end
|
#remove_newlines(string) ⇒ Object
3
4
5
|
# File 'lib/davclient/curl_commands.rb', line 3
def remove_newlines(string)
string.gsub("\n","").gsub(/ +/," ") + " "
end
|