Class P4SCMFile


  • public class P4SCMFile
    extends jenkins.scm.api.SCMFile
    • Method Detail

      • newChild

        protected jenkins.scm.api.SCMFile newChild​(@NonNull
                                                   String name,
                                                   boolean assumeIsDirectory)
        Specified by:
        newChild in class jenkins.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:
        children in class jenkins.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,
                                 InterruptedException
        Returns the time that the SCMFile was last modified.
        Specified by:
        lastModified in class jenkins.scm.api.SCMFile
        Returns:
        A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970) or 0L if 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,
                                                    InterruptedException
        The type of this object.
        Specified by:
        type in class jenkins.scm.api.SCMFile
        Returns:
        the SCMFile.Type of this object, specifically SCMFile.Type.NONEXISTENT if this SCMFile instance does not exist in the remote system (e.g. if you created a nonexistent instance via SCMFile.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:
        content in class jenkins.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.