Interface VcsWorkspaceAccess

    • Method Detail

      • getVcsFilesBrowser

        @NotNull
        Browser getVcsFilesBrowser()
        Returns:
        tree browser that shouws all contents VCS
        Since:
        8.1
      • getVcsFoldersBrowser

        @NotNull
        Browser getVcsFoldersBrowser()
        Returns:
        tree browser that shouws only directories in VCS
        Since:
        8.1
      • getFileContent

        @NotNull
        byte[] getFileContent​(@NotNull
                              String relativePath)
                       throws VcsException
        Get binary content of the file corresponding to the latest revision detected during the checking for changes process.
        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
        byte[] getFileContent​(@NotNull
                              String relativePath,
                              boolean latest)
                       throws VcsException
        Same as {@link #getFileContent(String, false)}
        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.
        Since:
        2020.2.1
      • listFiles

        @NotNull
        List<VcsFile> listFiles​(@NotNull
                                String relativePath)
                         throws VcsException
        Lists files in the directory specified by relativePath
        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)
      • canListFiles

        boolean canListFiles()
        Returns:
        true if list files is possible, false otherwise
      • mapVcsPath

        @Nullable
        PathMapping mapVcsPath​(@NotNull
                               String path)
        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.
        Parameters:
        path - a full path to a file (not necessarily existing)
        Returns:
        the path mapping object or null if no mapping exists