in pekko-connectors-sample-ftp-to-file/src/main/java/playground/filesystem/impl/JimfsView.java [45:76]
public JimfsView(FileSystem fileSystem, User user, boolean caseInsensitive)
throws FtpException {
if (fileSystem == null) {
throw new IllegalArgumentException("filesystem can not be null");
}
if (user == null) {
throw new IllegalArgumentException("user can not be null");
}
if (user.getHomeDirectory() == null) {
throw new IllegalArgumentException("user home directory can not be null");
}
this.fileSystem = fileSystem;
this.caseInsensitive = caseInsensitive;
// add last '/' if necessary
String rootDir = user.getHomeDirectory();
rootDir = normalizeSeparateChar(rootDir);
if (!rootDir.endsWith("/")) {
rootDir += '/';
}
LOG.debug("Jimfs filesystem view created by user \"{}\" with root \"{}\"", user.getName(), rootDir);
this.rootDir = rootDir;
this.user = user;
currDir = "/";
}