mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-20 16:26:58 +00:00
More file browser improvements [release]
This commit is contained in:
@@ -65,6 +65,14 @@ public class FileNames {
|
||||
}
|
||||
|
||||
public static String getParent(String file) {
|
||||
if (split(file).size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (split(file).size() == 1) {
|
||||
return file.startsWith("/") && !file.equals("/") ? "/" : null;
|
||||
}
|
||||
|
||||
return file.substring(0, file.length() - getFileName(file).length() - 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ public interface FileSystem extends Closeable, AutoCloseable {
|
||||
FileSystem fileSystem;
|
||||
@NonNull
|
||||
String path;
|
||||
@NonNull
|
||||
Instant date;
|
||||
boolean directory;
|
||||
boolean hidden;
|
||||
@@ -29,7 +28,7 @@ public interface FileSystem extends Closeable, AutoCloseable {
|
||||
long size;
|
||||
|
||||
public FileEntry(
|
||||
@NonNull FileSystem fileSystem, @NonNull String path, @NonNull Instant date, boolean directory, boolean hidden, Boolean executable,
|
||||
@NonNull FileSystem fileSystem, @NonNull String path, Instant date, boolean directory, boolean hidden, Boolean executable,
|
||||
long size
|
||||
) {
|
||||
this.fileSystem = fileSystem;
|
||||
|
||||
Reference in New Issue
Block a user