class JGitFileSystemImpl implements JGitFileSystem {

    @Override
    public Path getPath(final String first,
                        final String... more)
            throws InvalidPathException {
        checkClosed();
        if (first == null || first.trim().isEmpty() || first.trim().equals("/")) {
            return new JGitFSPath(this);
        }

        if (more == null || more.length == 0) {
            return JGitPathImpl.create(this,
                                       first,
                                       JGitPathImpl.DEFAULT_REF_TREE + "@" + name,
                                       false);
        }

        final StringBuilder sb = new StringBuilder();
        for (final String segment : more) {
            if (segment.length() > 0) {
                if (sb.length() > 0) {
                    sb.append(getSeparator());
                }
                sb.append(segment);
            }
        }
        return JGitPathImpl.create(this,
                                   sb.toString(),
                                   first + "@" + name,
                                   false);
    }

    public  JGitFileSystemImpl(final JGitFileSystemProvider provider,
                              final Map<String, String> fullHostNames,
                              final Git git,
                              final JGitFileSystemLock lock,
                              final String name,
                              final CredentialsProvider credential,
                              JGitFileSystemsEventsManager fsEventsManager,
                              Map<FileSystemHooks, ?> fsHooks);

}