}\r
return true;\r
}\r
+ \r
+ \r
+ /**\r
+ * Check if a file exists in the OC server\r
+ * \r
+ * @return 'Boolean.TRUE' if the file exists; 'Boolean.FALSE' it doesn't exist; NULL if couldn't be checked\r
+ */\r
+ public Boolean existsFile(String path) {\r
+ try {\r
+ HeadMethod head = new HeadMethod(mUri.toString() + WebdavUtils.encodePath(path));\r
+ int status = executeMethod(head);\r
+ return (status == HttpStatus.SC_OK);\r
+ } catch (Exception e) {\r
+ e.printStackTrace();\r
+ return null;\r
+ }\r
+ }\r
\r
\r
/**\r