@Override public void callback(final int returncode, final Path file) { file.setType(selected.getType()); callback.callback(Collections.singletonMap(selected, file)); }
@Override public void callback(final int returncode, final Path file) { file.setType(EnumSet.of(Path.Type.directory)); callback.callback(file, this.getLocation()); }
protected boolean post(final java.nio.file.Path path, final Path file) { if(Files.isSymbolicLink(path)) { final Path target; Path.Type type; try { target = new Path(path.toRealPath().toString(), EnumSet.of(Path.Type.file)); if(Files.isDirectory(path.toRealPath())) { type = Path.Type.directory; } else { type = Path.Type.file; } file.setType(EnumSet.of(Path.Type.symboliclink, type)); target.setType(EnumSet.of(type)); file.setSymlinkTarget(target); } catch(IOException e) { log.warn(String.format("Failure to read symbolic link of %s. %s", file, e.getMessage())); return false; } } return true; } }
final Path target = file.getSymlinkTarget(); if(session.getClient().changeWorkingDirectory(file.getAbsolute())) { file.setType(EnumSet.of(Path.Type.directory, Path.Type.symboliclink)); target.setType(EnumSet.of(Path.Type.directory)); file.setType(EnumSet.of(Path.Type.directory, Path.Type.symboliclink)); target.setType(EnumSet.of(Path.Type.directory)); file.setType(EnumSet.of(Path.Type.file, Path.Type.symboliclink)); target.setType(EnumSet.of(Path.Type.file));
private void setPath(final String absolute) { if(String.valueOf(Path.DELIMITER).equals(absolute)) { this._setPath(null, absolute); } else { final Path parent = new Path(PathNormalizer.parent(absolute, Path.DELIMITER), EnumSet.of(Type.directory)); parent.attributes().setRegion(attributes.getRegion()); if(parent.isRoot()) { parent.setType(EnumSet.of(Type.volume, Type.directory)); } this._setPath(parent, PathNormalizer.name(absolute)); } }
@Override public void callback(final int returncode, final Path file) { file.setType(EnumSet.of(Path.Type.directory)); final VaultCredentials credentials = new VaultCredentials(passwordField.stringValue()).withSaved(this.isSuppressed()); callback.callback(file, this.getLocation(), credentials); }
switch(f.getType()) { case FTPFile.SYMBOLIC_LINK_TYPE: parsed.setType(EnumSet.of(Path.Type.file, Path.Type.symboliclink));