This repository was archived by the owner on Mar 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/main/java/org/cryptomator/cloudaccess Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11package org .cryptomator .cloudaccess ;
22
3+ import java .net .URL ;
34import java .nio .file .Path ;
45
56import org .cryptomator .cloudaccess .api .CloudProvider ;
67import org .cryptomator .cloudaccess .localfs .LocalFsCloudProvider ;
8+ import org .cryptomator .cloudaccess .webdav .WebDavCloudProvider ;
9+ import org .cryptomator .cloudaccess .webdav .WebDavCredential ;
710
811public class CloudAccess {
912
1013 private CloudAccess () {
1114 }
1215
16+ /**
17+ * Creates a new CloudProvider which provides access to the given URL via WebDAV.
18+ *
19+ * @param url Base URL leading to the root resource
20+ * @param username Username used during basic or digest auth challenges
21+ * @param password Password used during basic or digest auth challenges
22+ * @return A cloud access provider that provides access to the given WebDAV URL.
23+ */
24+ public static CloudProvider toWebDAV (URL url , String username , CharSequence password ) {
25+ // TODO adapt types
26+ return WebDavCloudProvider .from (WebDavCredential .from (null , username , null ));
27+ }
28+
1329 /**
1430 * Creates a new CloudProvider which provides access to the given <code>folder</code>. Mainly for test purposes.
1531 *
You can’t perform that action at this time.
0 commit comments