Class RepoCommand.RemoteFile

  • Enclosing class:
    RepoCommand

    public static final class RepoCommand.RemoteFile
    extends Object
    Read-only view of contents and file mode (i.e. permissions) for a file in a remote repository.
    Since:
    5.2
    • Constructor Detail

      • RemoteFile

        public RemoteFile​(@NonNull
                          byte[] contents,
                          @NonNull
                          FileMode fileMode)
        Parameters:
        contents - Raw contents of the file.
        fileMode - Git file mode for this file (e.g. executable or regular)
    • Method Detail

      • getContents

        @NonNull
        public byte[] getContents()
        Contents of the file.

        Callers who receive this reference must not modify its contents (as it can point to internal cached data).

        Returns:
        Raw contents of the file. Do not modify it.
      • getFileMode

        @NonNull
        public FileMode getFileMode()
        Returns:
        Git file mode for this file (e.g. executable or regular)