File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
core/src/main/java/ch/cyberduck/core/features
ctera/src/main/java/ch/cyberduck/core/ctera Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ package ch .cyberduck .core .features ;
2+
3+ /*
4+ * Copyright (c) 2002-2024 iterate GmbH. All rights reserved.
5+ * https://cyberduck.io/
6+ *
7+ * This program is free software; you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation, either version 3 of the License, or
10+ * (at your option) any later version.
11+ *
12+ * This program is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ */
17+
18+ import ch .cyberduck .core .Path ;
19+ import ch .cyberduck .core .exception .BackgroundException ;
20+
21+ public class DefaultFileIdProvider implements FileIdProvider {
22+
23+ @ Override
24+ public String getFileId (final Path file ) throws BackgroundException {
25+ return file .attributes ().getFileId ();
26+ }
27+
28+ @ Override
29+ public void clear () {
30+ // No-op
31+ }
32+ }
Original file line number Diff line number Diff line change 4242import ch .cyberduck .core .features .AttributesFinder ;
4343import ch .cyberduck .core .features .Copy ;
4444import ch .cyberduck .core .features .CustomActions ;
45+ import ch .cyberduck .core .features .DefaultFileIdProvider ;
4546import ch .cyberduck .core .features .Delete ;
4647import ch .cyberduck .core .features .Directory ;
48+ import ch .cyberduck .core .features .FileIdProvider ;
4749import ch .cyberduck .core .features .Lock ;
4850import ch .cyberduck .core .features .Metadata ;
4951import ch .cyberduck .core .features .Move ;
@@ -212,6 +214,9 @@ public <T> T _getFeature(final Class<T> type) {
212214 if (type == Copy .class ) {
213215 return (T ) new CteraCopyFeature (this );
214216 }
217+ if (type == FileIdProvider .class ) {
218+ return (T ) new DefaultFileIdProvider ();
219+ }
215220 return super ._getFeature (type );
216221 }
217222
You can’t perform that action at this time.
0 commit comments