mirror of
https://github.com/owncloud/android-library.git
synced 2026-08-20 04:43:01 +00:00
Changes from comments in PR#55
This commit is contained in:
@@ -78,27 +78,9 @@ public class ReadRemoteFileOperation extends RemoteOperation {
|
||||
|
||||
/// take the duty of check the server for the current state of the file there
|
||||
try {
|
||||
// PropFind Properties ( instead of DavConstants.PROPFIND_ALL_PROP )
|
||||
DavPropertyNameSet propSet = new DavPropertyNameSet();
|
||||
propSet.add(DavPropertyName.DISPLAYNAME);
|
||||
propSet.add(DavPropertyName.GETCONTENTTYPE);
|
||||
propSet.add(DavPropertyName.RESOURCETYPE);
|
||||
propSet.add(DavPropertyName.GETCONTENTLENGTH);
|
||||
propSet.add(DavPropertyName.GETLASTMODIFIED);
|
||||
propSet.add(DavPropertyName.CREATIONDATE);
|
||||
propSet.add(DavPropertyName.GETETAG);
|
||||
propSet.add(DavPropertyName.create(WebdavEntry.PROPERTY_QUOTA_USED_BYTES));
|
||||
propSet.add(DavPropertyName.create(WebdavEntry.PROPERTY_QUOTA_AVAILABLE_BYTES));
|
||||
propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_PERMISSIONS,
|
||||
Namespace.getNamespace(WebdavEntry.NAMESPACE_OC));
|
||||
propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_REMOTE_ID,
|
||||
Namespace.getNamespace(WebdavEntry.NAMESPACE_OC));
|
||||
propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_SIZE,
|
||||
Namespace.getNamespace(WebdavEntry.NAMESPACE_OC));
|
||||
|
||||
// remote request
|
||||
propfind = new PropFindMethod(client.getWebdavUri() + WebdavUtils.encodePath(mRemotePath),
|
||||
propSet,
|
||||
WebdavUtils.getFilePropSet(), // PropFind Properties
|
||||
DavConstants.DEPTH_0);
|
||||
int status;
|
||||
status = client.executeMethod(propfind, SYNC_READ_TIMEOUT, SYNC_CONNECTION_TIMEOUT);
|
||||
|
||||
@@ -75,27 +75,9 @@ public class ReadRemoteFolderOperation extends RemoteOperation {
|
||||
PropFindMethod query = null;
|
||||
|
||||
try {
|
||||
// PropFind Properties ( instead of DavConstants.PROPFIND_ALL_PROP )
|
||||
DavPropertyNameSet propSet = new DavPropertyNameSet();
|
||||
propSet.add(DavPropertyName.DISPLAYNAME);
|
||||
propSet.add(DavPropertyName.GETCONTENTTYPE);
|
||||
propSet.add(DavPropertyName.RESOURCETYPE);
|
||||
propSet.add(DavPropertyName.GETCONTENTLENGTH);
|
||||
propSet.add(DavPropertyName.GETLASTMODIFIED);
|
||||
propSet.add(DavPropertyName.CREATIONDATE);
|
||||
propSet.add(DavPropertyName.GETETAG);
|
||||
propSet.add(DavPropertyName.create(WebdavEntry.PROPERTY_QUOTA_USED_BYTES));
|
||||
propSet.add(DavPropertyName.create(WebdavEntry.PROPERTY_QUOTA_AVAILABLE_BYTES));
|
||||
propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_PERMISSIONS,
|
||||
Namespace.getNamespace(WebdavEntry.NAMESPACE_OC));
|
||||
propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_REMOTE_ID,
|
||||
Namespace.getNamespace(WebdavEntry.NAMESPACE_OC));
|
||||
propSet.add(WebdavEntry.EXTENDED_PROPERTY_NAME_SIZE,
|
||||
Namespace.getNamespace(WebdavEntry.NAMESPACE_OC));
|
||||
|
||||
// remote request
|
||||
query = new PropFindMethod(client.getWebdavUri() + WebdavUtils.encodePath(mRemotePath),
|
||||
propSet,
|
||||
WebdavUtils.getAllPropSet(), // PropFind Properties
|
||||
DavConstants.DEPTH_1);
|
||||
int status = client.executeMethod(query);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user