Class SourcePathParser
- java.lang.Object
-
- jetbrains.buildServer.artifacts.impl.SourcePathParser
-
public class SourcePathParser extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
ARCHIVE_PART_DELIMITER
-
Constructor Summary
Constructors Constructor Description SourcePathParser(String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getArchivePath()
String
getArchivePathNonWildcard()
String
getArtifactPath()
String
getOriginalPath()
static int
getWildcardIndex(String s)
boolean
hasArchivePath()
String
toString()
String
trimBaseDir(String relativePath)
From relativePath, trims base directory to get target path.
-
-
-
Field Detail
-
ARCHIVE_PART_DELIMITER
public static final String ARCHIVE_PART_DELIMITER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SourcePathParser
public SourcePathParser(String path)
-
-
Method Detail
-
getArtifactPath
@NotNull public String getArtifactPath()
-
getArchivePath
@Nullable public String getArchivePath()
-
getArchivePathNonWildcard
@Nullable public String getArchivePathNonWildcard()
-
getWildcardIndex
public static int getWildcardIndex(String s)
-
hasArchivePath
public boolean hasArchivePath()
-
getOriginalPath
public String getOriginalPath()
-
trimBaseDir
public String trimBaseDir(String relativePath)
From relativePath, trims base directory to get target path. Trims only constant part of the path, which is present in sourcePathExample:
- For a source path path/** and given file path/foo/bar.txt will return foo/bar.txt
- For a source path path/file.txt and given file path/file.txt will return file.txt
- For a source path file.txt and given file file.txt will return file.txt
- For a source path path/file.txt and given file path2/file.txt will return path2/file.txt
- Parameters:
relativePath
- incoming relative path- Returns:
- relativePath with removed source base directory, see above for example
-
-