use of com.owncloud.android.lib.resources.files.CreateRemoteFolderOperation in project android by owncloud.
the class CreateFolderOperation method run.
@Override
protected RemoteOperationResult run(OwnCloudClient client) {
CreateRemoteFolderOperation createRemoteFolderOperation = new CreateRemoteFolderOperation(mRemotePath, mCreateFullPath);
RemoteOperationResult result = createRemoteFolderOperation.execute(client);
if (result.isSuccess()) {
OCFile newDir = saveFolderInDB();
String localPath = FileStorageUtils.getDefaultSavePathFor(getStorageManager().getAccount().name, newDir);
File localFile = new File(localPath);
boolean created = localFile.mkdirs();
if (!created) {
Timber.w("Local folder " + localPath + " was not fully created");
}
} else {
Timber.e("%s hasn't been created", mRemotePath);
}
return result;
}
Aggregations