mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
fix spelling mistakes
This commit is contained in:
parent
fc8440cc01
commit
4f3e167efa
@ -44,18 +44,18 @@ import java.util.concurrent.TimeUnit
|
|||||||
* @author Abel García de Prada
|
* @author Abel García de Prada
|
||||||
*
|
*
|
||||||
* @param remotePath Path to append to the URL owned by the client instance.
|
* @param remotePath Path to append to the URL owned by the client instance.
|
||||||
* @param isUserLogged When `true`, the username won't be added at the end of the PROPFIND url since is not
|
* @param isUserLoggedIn When `true`, the username won't be added at the end of the PROPFIND url since is not
|
||||||
* needed to check user credentials
|
* needed to check user credentials
|
||||||
*/
|
*/
|
||||||
class CheckPathExistenceRemoteOperation(
|
class CheckPathExistenceRemoteOperation(
|
||||||
val remotePath: String? = "",
|
val remotePath: String? = "",
|
||||||
val isUserLogged: Boolean
|
val isUserLoggedIn: Boolean
|
||||||
) : RemoteOperation<Boolean>() {
|
) : RemoteOperation<Boolean>() {
|
||||||
|
|
||||||
override fun run(client: OwnCloudClient): RemoteOperationResult<Boolean> {
|
override fun run(client: OwnCloudClient): RemoteOperationResult<Boolean> {
|
||||||
return try {
|
return try {
|
||||||
val stringUrl =
|
val stringUrl =
|
||||||
if (isUserLogged) client.baseFilesWebDavUri.toString()
|
if (isUserLoggedIn) client.baseFilesWebDavUri.toString()
|
||||||
else client.userFilesWebDavUri.toString() + WebdavUtils.encodePath(remotePath)
|
else client.userFilesWebDavUri.toString() + WebdavUtils.encodePath(remotePath)
|
||||||
|
|
||||||
val propFindMethod = PropfindMethod(URL(stringUrl), 0, allPropset).apply {
|
val propFindMethod = PropfindMethod(URL(stringUrl), 0, allPropset).apply {
|
||||||
|
@ -33,6 +33,6 @@ class OCFileService(override val client: OwnCloudClient) :
|
|||||||
override fun checkPathExistence(path: String, isUserLogged: Boolean): RemoteOperationResult<Boolean> =
|
override fun checkPathExistence(path: String, isUserLogged: Boolean): RemoteOperationResult<Boolean> =
|
||||||
CheckPathExistenceRemoteOperation(
|
CheckPathExistenceRemoteOperation(
|
||||||
remotePath = path,
|
remotePath = path,
|
||||||
isUserLogged = isUserLogged
|
isUserLoggedIn = isUserLogged
|
||||||
).execute(client)
|
).execute(client)
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ class OCServerInfoService : ServerInfoService {
|
|||||||
): RemoteOperationResult<Boolean> =
|
): RemoteOperationResult<Boolean> =
|
||||||
CheckPathExistenceRemoteOperation(
|
CheckPathExistenceRemoteOperation(
|
||||||
remotePath = path,
|
remotePath = path,
|
||||||
isUserLogged = true
|
isUserLoggedIn = true
|
||||||
).execute(client)
|
).execute(client)
|
||||||
|
|
||||||
override fun getRemoteStatus(
|
override fun getRemoteStatus(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user