Class ServerPaths

  • All Implemented Interfaces:
    CachePaths

    public class ServerPaths
    extends Object
    implements CachePaths
    Provides information about TeamCity server working paths locations.
    • Constructor Detail

      • ServerPaths

        public ServerPaths​(@NotNull
                           String rootDir)
        Creates an instance of ServerPath.
        Parameters:
        rootDir - the TeamCity Data Directory.
        See Also:
        ServerPaths(File)
      • ServerPaths

        public ServerPaths​(@NotNull
                           File rootDir)
        Creates an instance of ServerPath.
        Parameters:
        rootDir - the TeamCity Data Directory.
        Since:
        9.1
        See Also:
        ServerPaths(String)
    • Method Detail

      • setCachesDir

        public void setCachesDir​(@Nullable
                                 String cachesDir)
      • isCustomCachesDir

        public boolean isCustomCachesDir()
        Returns:
        true if custom caches directory was specified
        Since:
        2020.1.1
      • getLogsPath

        @NotNull
        public File getLogsPath()
        Returns path to logs dir. In some cases logs dir may be changes by reconfiguring log4j.
        Returns:
        path to logs folder is it exists on null
      • getSystemDir

        public String getSystemDir()
        Returns path to the TeamCity system directory. This directory contains build logs, artifacts, HSQLDB database files, and other non-configuration stuff. Usually, this is TEAMCITY_DATA_PATH/system, where TEAMCITY_DATA_PATH is specified as system property teamcity.data.path or environment variable TEAMCITY_DATA_PATH or $HOME/.BuildServer
        Returns:
        TeamCity system directory
      • getCachesDir

        public String getCachesDir()
        Returns path to the TeamCity caches directory. Could be used to store caches for plugins or core services.
        Returns:
        TeamCity caches directory
      • getCacheDirectory

        @NotNull
        public File getCacheDirectory​(@NotNull
                                      String name)
        Returns a directory to store caches
        Specified by:
        getCacheDirectory in interface CachePaths
        Parameters:
        name - name of cache
        Returns:
        existing directory to store caches
        Since:
        8.0
      • getConfigDir

        public String getConfigDir()
        Returns path to the TeamCity configuration directory. This directory contains various settings of TeamCity, including description of projects, build configurations, and other settings. Usually, this is TEAMCITY_DATA_PATH/config, where TEAMCITY_DATA_PATH is specified as system property teamcity.data.path or environment variable TEAMCITY_DATA_PATH or $HOME/.BuildServer
        Returns:
        TeamCity configuration directory
      • getBackupDir

        public String getBackupDir()
        Directory for backup TeamCity data.
        Returns:
        TeamCity backup directory.
      • getImportDir

        public String getImportDir()
        Directory containing archives that can be used to import projects.
        Since:
        9.0
      • getProjectsDir

        @NotNull
        public File getProjectsDir()
        Returns:
        server projects directory path
        Since:
        8.0
      • getArtifactsDirectory

        @NotNull
        public File getArtifactsDirectory()
        Returns:
        default artifacts directory. Since 9.1 this method is only used to obtain default artifacts directory if no other directories are specified. To get all configured artifact directories, use jetbrains.buildServer.serverSide.ServerSettings#getArtifactDirectories() method
      • getPluginDataDirectory

        @NotNull
        public File getPluginDataDirectory()
        Returns TeamCity plugins data directory (root for all of the plugins).
      • getDataDirectory

        @NotNull
        public File getDataDirectory()
        Returns TeamCity data directory (root for all of the configuration directories).
        Returns:
        TeamCity data directory
      • getLibDir

        public String getLibDir()
      • getPluginsDir

        public String getPluginsDir()