Package jenkins.scm.api
Class SCMProbe
java.lang.Object
jenkins.scm.api.SCMSourceCriteria.Probe
jenkins.scm.api.SCMProbe
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
An unmanaged
SCMSourceCriteria.Probe
that has its lifecycle managed outside of
SCMSource.fetch(TaskListener)
. A SCMProbe
is used to check and recheck SCMSourceCriteria
so implementations are strongly recommended to provide caching of results from stat(String)
and
SCMSourceCriteria.Probe.lastModified()
.- Since:
- 2.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Deprecated.abstract SCMProbeStat
Checks if the path, relative to the head candidate root, exists or not.Methods inherited from class jenkins.scm.api.SCMSourceCriteria.Probe
getRoot, lastModified, name
-
Constructor Details
-
SCMProbe
public SCMProbe()
-
-
Method Details
-
exists
Deprecated.usestat(String)
Checks if the path, relative to the head candidate root, exists or not. The results of this method should be cached where possible but can involve a remote network call.- Specified by:
exists
in classSCMSourceCriteria.Probe
- Parameters:
path
- the path.- Returns:
true
iff the path exists (may be a file or a directory or a symlink or whatever).- Throws:
IOException
- if a remote network call failed and the result is therefore indeterminate.
-
stat
Checks if the path, relative to the head candidate root, exists or not. The results of this method should be cached where possible but can involve a remote network call.- Overrides:
stat
in classSCMSourceCriteria.Probe
- Parameters:
path
- the path.- Returns:
- The results of the check.
- Throws:
IOException
- if a remote network call failed and the result is therefore indeterminate.
-
stat(String)