From 6f128d83b5be7a780be8c130da668e6abd6522e0 Mon Sep 17 00:00:00 2001 From: David Vargas Date: Fri, 2 Dec 2022 09:22:11 +0000 Subject: [PATCH] [U] . --- bin/nextcloud/06-webdav.rb | 18 ++++++++++-------- bin/nextcloud/20-find-files.sh | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 8 deletions(-) create mode 100755 bin/nextcloud/20-find-files.sh diff --git a/bin/nextcloud/06-webdav.rb b/bin/nextcloud/06-webdav.rb index 90e0086..266271a 100755 --- a/bin/nextcloud/06-webdav.rb +++ b/bin/nextcloud/06-webdav.rb @@ -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 diff --git a/bin/nextcloud/20-find-files.sh b/bin/nextcloud/20-find-files.sh new file mode 100755 index 0000000..acff4f6 --- /dev/null +++ b/bin/nextcloud/20-find-files.sh @@ -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 ' + + + + + + + + + + ' +