Skip to content

Commit 73f93e4

Browse files
committed
catch up with dependencies update
1 parent e7b6853 commit 73f93e4

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

src/main/java/vavi/nio/file/du/DuFileSystemDriver.java

+18-17
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
import java.util.List;
1919
import java.util.Map;
2020
import java.util.Set;
21+
import java.util.logging.Level;
2122

22-
import com.github.fge.filesystem.driver.CachedFileSystemDriverBase;
23+
import com.github.fge.filesystem.driver.CachedFileSystemDriver;
2324
import com.github.fge.filesystem.exceptions.IsDirectoryException;
2425
import com.github.fge.filesystem.provider.FileSystemFactoryProvider;
2526

@@ -43,7 +44,7 @@
4344
* @author <a href="mailto:umjammer@gmail.com">Naohide Sano</a> (umjammer)
4445
* @version 0.00 2019/11/17 umjammer initial version <br>
4546
*/
46-
public final class DuFileSystemDriver extends CachedFileSystemDriverBase<DiscFileSystemInfo> {
47+
public final class DuFileSystemDriver extends CachedFileSystemDriver<DiscFileSystemInfo> {
4748

4849
private DiscFileSystem fileSystem;
4950

@@ -65,7 +66,7 @@ private static String toJavaPathString(String path) {
6566
}
6667

6768
@Override
68-
protected String getFilenameString(DiscFileSystemInfo entry) throws IOException {
69+
protected String getFilenameString(DiscFileSystemInfo entry) {
6970
return toJavaPathString(entry.getFullName());
7071
}
7172

@@ -76,8 +77,8 @@ protected boolean isFolder(DiscFileSystemInfo entry) {
7677

7778
@Override
7879
protected DiscFileSystemInfo getRootEntry(Path root) throws IOException {
79-
Debug.println("path: " + toDuPathString(root));
80-
Debug.println("root: " + fileSystem.getDirectoryInfo(toDuPathString(root)));
80+
Debug.println(Level.FINE, "path: " + toDuPathString(root));
81+
//Debug.println(Level.FINE, "root: " + fileSystem.getDirectoryInfo(toDuPathString(root)));
8182
return fileSystem.getDirectoryInfo(toDuPathString(root));
8283
}
8384

@@ -121,18 +122,6 @@ protected OutputStream uploadEntry(DiscFileSystemInfo parentEntry, Path path, Se
121122
// TODO cache.addEntry(path, newEntry);
122123
}
123124

124-
@Override
125-
protected DiscFileSystemInfo createDirectoryEntry(DiscFileSystemInfo parentEntry, Path dir) throws IOException {
126-
// TODO: how to diagnose?
127-
fileSystem.createDirectory(dir.toString());
128-
return getEntry(null, dir);
129-
}
130-
131-
@Override
132-
public void close() throws IOException {
133-
fileSystem.close();
134-
}
135-
136125
@Override
137126
protected List<DiscFileSystemInfo> getDirectoryEntries(DiscFileSystemInfo dirEntry, Path dir) throws IOException {
138127
List<DiscFileSystemInfo> list = new ArrayList<>();
@@ -143,6 +132,13 @@ protected List<DiscFileSystemInfo> getDirectoryEntries(DiscFileSystemInfo dirEnt
143132
return list;
144133
}
145134

135+
@Override
136+
protected DiscFileSystemInfo createDirectoryEntry(DiscFileSystemInfo parentEntry, Path dir) throws IOException {
137+
// TODO: how to diagnose?
138+
fileSystem.createDirectory(dir.toString());
139+
return getEntry(null, dir);
140+
}
141+
146142
@Override
147143
protected boolean hasChildren(DiscFileSystemInfo dirEntry, Path dir) throws IOException {
148144
return getDirectoryEntries(dirEntry, dir).size() > 0;
@@ -182,4 +178,9 @@ protected DiscFileSystemInfo renameEntry(DiscFileSystemInfo sourceEntry, DiscFil
182178
fileSystem.moveFile(toDuPathString(source), toDuPathString(target));
183179
return getEntry(null, target);
184180
}
181+
182+
@Override
183+
public void close() throws IOException {
184+
fileSystem.close();
185+
}
185186
}

0 commit comments

Comments
 (0)