Skip to content

Commit 70dfb62

Browse files
committed
Merge branch 'worktree-explorer'
2 parents 35cebb6 + 8a66346 commit 70dfb62

104 files changed

Lines changed: 3270 additions & 3743 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

EXPLORER_OPERATIONS_IMPLEMENTATION.md

Lines changed: 0 additions & 547 deletions
This file was deleted.

EXPLORER_REFACTOR_PLAN.md

Lines changed: 0 additions & 412 deletions
This file was deleted.

app-common-io/src/main/aidl/eu/darken/butler/common/files/FileType.aidl

Lines changed: 0 additions & 5 deletions
This file was deleted.

app-common-io/src/main/aidl/eu/darken/butler/common/files/Ownership.aidl

Lines changed: 0 additions & 5 deletions
This file was deleted.

app-common-io/src/main/aidl/eu/darken/butler/common/files/Permissions.aidl

Lines changed: 0 additions & 5 deletions
This file was deleted.

app-common-io/src/main/aidl/eu/darken/butler/common/files/local/ipc/FileOpsConnection.aidl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import eu.darken.butler.common.ipc.RemoteOutputStream;
66
import eu.darken.butler.common.files.LocalPath;
77
import eu.darken.butler.common.files.local.LocalPathLookup;
88
import eu.darken.butler.common.files.local.LocalPathLookupExtended;
9-
import eu.darken.butler.common.files.Ownership;
10-
import eu.darken.butler.common.files.Permissions;
9+
import eu.darken.butler.common.files.metadata.Ownership;
10+
import eu.darken.butler.common.files.metadata.Permissions;
1111

1212
interface FileOpsConnection {
1313

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package eu.darken.butler.common.files.metadata;
2+
3+
import eu.darken.butler.common.files.metadata.FileType;
4+
5+
parcelable FileType;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package eu.darken.butler.common.files.metadata;
2+
3+
import eu.darken.butler.common.files.metadata.Ownership;
4+
5+
parcelable Ownership;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package eu.darken.butler.common.files.metadata;
2+
3+
import eu.darken.butler.common.files.metadata.Permissions;
4+
5+
parcelable Permissions;

app-common-io/src/main/java/eu/darken/butler/common/files/APathGateway.kt

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
package eu.darken.butler.common.files
22

3+
import eu.darken.butler.common.files.metadata.Ownership
4+
import eu.darken.butler.common.files.metadata.Permissions
5+
import eu.darken.butler.common.files.operations.CopyOperation
6+
import eu.darken.butler.common.files.operations.MoveOperation
37
import eu.darken.butler.common.sharedresource.HasSharedResource
48
import kotlinx.coroutines.flow.Flow
59
import okio.FileHandle
610
import kotlin.time.Instant
711

812
interface APathGateway<
9-
P : APath,
10-
PLU : APathLookup<P>,
11-
PLUE : APathLookupExtended<P>,
12-
> : HasSharedResource<Any> {
13+
P : APath,
14+
PLU : APathLookup<P>,
15+
PLUE : APathLookupExtended<P>,
16+
> : HasSharedResource<Any>, CopyOperation<P>, MoveOperation<P> {
1317

1418
suspend fun createDir(path: P)
1519

@@ -63,4 +67,16 @@ interface APathGateway<
6367
suspend fun setPermissions(path: P, permissions: Permissions): Boolean
6468

6569
suspend fun setOwnership(path: P, ownership: Ownership): Boolean
70+
71+
override suspend fun copy(
72+
source: P,
73+
destination: P,
74+
options: CopyOperation.Options
75+
): Flow<CopyOperation.Result>
76+
77+
override suspend fun move(
78+
source: P,
79+
destination: P,
80+
options: MoveOperation.Options
81+
): Flow<MoveOperation.Result>
6682
}

0 commit comments

Comments
 (0)