public FileSystem createFileSystem()

in src/main/java/org/apache/sling/jcr/filetransfer/sftp/internal/JcrFileSystemFactory.java [79:93]


    public FileSystem createFileSystem(final org.apache.sshd.common.session.Session session) throws IOException {
        logger.info("creating file system for {}", session.getUsername());
        try {
            final String username = session.getUsername();
            final String chroot = chrootDirectoryProvider.getChrootDirectory(session);
            final Session jcrSession = createUserSession(username);
            final URI uri = new URI("jcr", null, chroot, null);
            final Map<String, Object> env = new HashMap<>();
            env.put(Session.class.getName(), jcrSession);
            logger.debug("file system URI: {}", uri.toString());
            return fileSystemProvider.newFileSystem(uri, env);
        } catch (Exception e) {
            throw new IOException(e);
        }
    }