main
David Vargas 2022-12-02 09:22:11 +00:00
parent 637e757488
commit 6f128d83b5
2 changed files with 29 additions and 8 deletions

View File

@ -10,14 +10,16 @@ webdav = nextcloud.webdav
path = webdav.directory.instance_variable_get(:@path)
puts "* webdav.directory(@path): #{path}"
# dir = "files_from_git"
# binding.break
# result = webdav.directory.create(dir)
# puts result
dir = "files_from_git"
binding.break
result = webdav.directory.create(dir)
puts result
# result = webdav.directory.put("lib.rb", File.join(dir, "lib.rb"))
# puts result
result = webdav.directory.put("lib.rb", File.join(dir, "lib.rb"))
puts result
dir2 = "/remote.php/dav/files/dvarrui/"
file = "Nextcloud%20Manual.pdf"
dir = webdav.directory.find
puts dir.contents
data = webdav.directory.find file
puts data.contents

19
bin/nextcloud/20-find-files.sh Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
. .env
echo $URL
echo "===="
curl -u $USERNAME:$PASSWORD "$URL/remote.php/dav/files/$USERNAME" -X PROPFIND --data '<?xml version="1.0" encoding="UTF-8"?>
<d:propfind xmlns:d="DAV:">
<d:prop xmlns:oc="http://owncloud.org/ns">
<d:getlastmodified/>
<d:getcontentlength/>
<d:getcontenttype/>
<oc:permissions/>
<d:resourcetype/>
<d:getetag/>
</d:prop>
</d:propfind>'