public FileHandle child (String name) { if (file.getPath().length() == 0) return new DesktopFileHandle(new File(name), type); return new DesktopFileHandle(new File(file, name), type); }
public FileHandle parent () { File parent = file.getParentFile(); if (parent == null) { if (type == FileType.Absolute) parent = new File("/"); else parent = new File(""); } return new DesktopFileHandle(parent, type); }
public FileHandle sibling (String name) { if (file.getPath().length() == 0) throw new GdxRuntimeException("Cannot get the sibling of the root."); return new DesktopFileHandle(new File(file.getParent(), name), type); }
@Override public FileHandle newFileHandle (File file) { return new DesktopFileHandle(file, FileType.Absolute); }
@Override public FileHandle newFileHandle (String fileName) { return new DesktopFileHandle(fileName, FileType.Absolute); }
@Override public FileHandle newFileHandle (File file, FileType type) { return new DesktopFileHandle(file, type); }
public FileHandle sibling (String name) { if (file.getPath().length() == 0) throw new GdxRuntimeException("Cannot get the sibling of the root."); return new DesktopFileHandle(new File(file.getParent(), name), type); }
public FileHandle child (String name) { if (file.getPath().length() == 0) return new DesktopFileHandle(new File(name), type); return new DesktopFileHandle(new File(file, name), type); }
@Override public FileHandle newFileHandle (String fileName, FileType type) { return new DesktopFileHandle(fileName, type); }
public FileHandle parent () { File parent = file.getParentFile(); if (parent == null) { if (type == FileType.Absolute) parent = new File("/"); else parent = new File(""); } return new DesktopFileHandle(parent, type); }
@Override public FileHandle resolve (String fileName) { return new DesktopFileHandle(fileName, fileType); } };
@Override public FileHandleResolver newResolver (final FileType fileType) { return new FileHandleResolver() { @Override public FileHandle resolve (String fileName) { return new DesktopFileHandle(fileName, fileType); } }; }
@Override public FileHandle newFileHandle (String fileName) { return new DesktopFileHandle(fileName, FileType.Absolute); }
@Override public FileHandle newFileHandle (File file, FileType type) { return new DesktopFileHandle(file, type); }
@Override public FileHandle newFileHandle (File file) { return new DesktopFileHandle(file, FileType.Absolute); }
@Override public FileHandle newFileHandle (String fileName, FileType type) { return new DesktopFileHandle(fileName, type); }
@Override public FileHandle resolve (String fileName) { return new DesktopFileHandle(fileName, fileType); } };
@Override public FileHandleResolver newResolver (final FileType fileType) { return new FileHandleResolver() { @Override public FileHandle resolve (String fileName) { return new DesktopFileHandle(fileName, fileType); } }; }