Package org.jenkinsci.plugins.p4.scm
Class P4SCMFile
- java.lang.Object
-
- jenkins.scm.api.SCMFile
-
- org.jenkinsci.plugins.p4.scm.P4SCMFile
-
public class P4SCMFile extends jenkins.scm.api.SCMFile
-
-
Constructor Summary
Constructors Constructor Description P4SCMFile(P4SCMFileSystem fs)P4SCMFile(P4SCMFileSystem fs, P4SCMFile parent, String name, boolean isDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<jenkins.scm.api.SCMFile>children()If this object represents a directory, lists up all the immediate children.InputStreamcontent()Reads the content of this file.longlastModified()Returns the time that theSCMFilewas last modified.protected jenkins.scm.api.SCMFilenewChild(String name, boolean assumeIsDirectory)protected jenkins.scm.api.SCMFile.Typetype()The type of this object.
-
-
-
Constructor Detail
-
P4SCMFile
public P4SCMFile(P4SCMFileSystem fs)
-
P4SCMFile
public P4SCMFile(P4SCMFileSystem fs, @NonNull P4SCMFile parent, String name, boolean isDir)
-
-
Method Detail
-
newChild
protected jenkins.scm.api.SCMFile newChild(@NonNull String name, boolean assumeIsDirectory)- Specified by:
newChildin classjenkins.scm.api.SCMFile
-
children
public Iterable<jenkins.scm.api.SCMFile> children() throws IOException, InterruptedException
If this object represents a directory, lists up all the immediate children.- Specified by:
childrenin classjenkins.scm.api.SCMFile- Returns:
- Always non-null. If this method is not a directory, this method returns an empty iterable.
- Throws:
IOException- if an error occurs while performing the operation.InterruptedException- if interrupted while performing the operation.
-
lastModified
public long lastModified() throws IOException, InterruptedExceptionReturns the time that theSCMFilewas last modified.- Specified by:
lastModifiedin classjenkins.scm.api.SCMFile- Returns:
- A
longvalue representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970) or0Lif the operation is unsupported. - Throws:
IOException- if an error occurs while performing the operation.InterruptedException- if interrupted while performing the operation.
-
type
protected jenkins.scm.api.SCMFile.Type type() throws IOException, InterruptedExceptionThe type of this object.- Specified by:
typein classjenkins.scm.api.SCMFile- Returns:
- the
SCMFile.Typeof this object, specificallySCMFile.Type.NONEXISTENTif thisSCMFileinstance does not exist in the remote system (e.g. if you created a nonexistent instance viaSCMFile.child(String)) - Throws:
IOException- if an error occurs while performing the operation.InterruptedException- if interrupted while performing the operation.- Since:
- 2.0
-
content
public InputStream content() throws IOException, InterruptedException
Reads the content of this file.- Specified by:
contentin classjenkins.scm.api.SCMFile- Returns:
- an open stream to read the file content. The caller must close the stream.
- Throws:
IOException- if this object represents a directory or if an error occurs while performing the operation.InterruptedException- if interrupted while performing the operation.
-
-