Package org.apache.sshd.git
Interface GitLocationResolver
-
public interface GitLocationResolver
Used by the GIT command(s) to resolve the root directory of the GIT repository
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static GitLocationResolver
constantPath(java.nio.file.Path rootDir)
Creates a resolver that returns the same root directory for any invocation ofresolveRootDirectory
java.nio.file.Path
resolveRootDirectory(java.lang.String command, java.lang.String[] args, org.apache.sshd.server.session.ServerSession session, java.nio.file.FileSystem fs)
-
-
-
Method Detail
-
resolveRootDirectory
java.nio.file.Path resolveRootDirectory(java.lang.String command, java.lang.String[] args, org.apache.sshd.server.session.ServerSession session, java.nio.file.FileSystem fs) throws java.io.IOException
- Parameters:
command
- The complete received commandargs
- The command split into arguments -args[0]
is the "pure" command itself without any other arguments. Note: changing the content of the arguments array may affect command execution in undetermined ways, due to invocation code changes without prior notice, so highly recommended to avoid it.session
- TheServerSession
through which the command was receivedfs
- TheFileSystem
associated with the server session- Returns:
- The local GIT repository root path
- Throws:
java.io.IOException
- If failed to resolve
-
constantPath
static GitLocationResolver constantPath(java.nio.file.Path rootDir)
Creates a resolver that returns the same root directory for any invocation ofresolveRootDirectory
- Parameters:
rootDir
- The (nevernull
) root directory to return- Returns:
- The wrapper resolver
-
-