Class VcsWorkspaceAccessImpl

    • Method Detail

      • getFileContent

        @NotNull
        public byte[] getFileContent​(@NotNull
                                     String relativePath)
                              throws VcsException
        Description copied from interface: VcsWorkspaceAccess
        Get binary content of the file corresponding to the latest revision detected during the checking for changes process.
        Specified by:
        getFileContent in interface VcsWorkspaceAccess
        Parameters:
        relativePath - relative file path regarding to the project root, "checkout root" from vcs root should not be included
        Returns:
        binary content of the file
        Throws:
        VcsException - if some problem occurred while getting file content from the source control repository.
      • getFileContent

        @NotNull
        public byte[] getFileContent​(@NotNull
                                     String relativePath,
                                     boolean latest)
                              throws VcsException
        Description copied from interface: VcsWorkspaceAccess
        Same as {@link #getFileContent(String, false)}
        Specified by:
        getFileContent in interface VcsWorkspaceAccess
        Parameters:
        relativePath - relative file path regarding to the project root, "checkout root" from vcs root should not be included
        latest - if false, then file content corresponds to the revision detected during the last checking for changes process, if true, then the file content for the current repository revision will be returned
        Returns:
        binary content of the file
        Throws:
        VcsException - if some problem occurred while getting file content from the source control repository.
      • mapVcsPath

        public PathMapping mapVcsPath​(@NotNull
                                      String path)
        Description copied from interface: VcsWorkspaceAccess
        Returns path mapping for the given full VCS path of a file if this path can correspond to any of the project's VCS roots. Full path is from the root of build type, e.g. for VCS root with checkout rules +:.=>subdir, file f in the this root has a full path subdir/f.
        Specified by:
        mapVcsPath in interface VcsWorkspaceAccess
        Parameters:
        path - a full path to a file (not necessarily existing)
        Returns:
        the path mapping object or null if no mapping exists
      • canListFiles

        public boolean canListFiles()
        Specified by:
        canListFiles in interface VcsWorkspaceAccess
        Returns:
        true if list files is possible, false otherwise
      • listFiles

        @NotNull
        public List<VcsFile> listFiles​(@NotNull
                                       String relativePath)
                                throws VcsException
        Description copied from interface: VcsWorkspaceAccess
        Lists files in the directory specified by relativePath
        Specified by:
        listFiles in interface VcsWorkspaceAccess
        Parameters:
        relativePath - relative path regarding to the project root, "checkout root" from vcs root should not be included
        Returns:
        list of files in directory
        Throws:
        VcsException - if some problem occurred while listing files or when files cannot be listed (canListFiles() returns false)