Package org.artifactory.repo
Interface RepoPath
- All Superinterfaces:
Info
,Serializable
- All Known Subinterfaces:
RemoteRepoPath
Holds a compound path of a repository key and a path within that repository, separated by a ':'
- Author:
- Fred Simon
-
Field Summary
Modifier and TypeFieldDescriptionstatic final char
static final char
static final String
static final char
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
getName()
getPath()
Returns the path within the repository - this excludes the repository key and includes the folder/file name.boolean
Whether this repoPath is a subset of provided parent path ex.boolean
isFile()
Whether this repo path is a path to a file, rather than a folder.boolean
isFolder()
Whether this repo path is a path to a folder, rather than a file.boolean
isRoot()
toPath()
A path composed of the repository key and path.
-
Field Details
-
REPO_PATH_SEP
static final char REPO_PATH_SEP- See Also:
-
ARCHIVE_SEP
static final char ARCHIVE_SEP- See Also:
-
PATH_SEPARATOR
static final char PATH_SEPARATOR- See Also:
-
REMOTE_CACHE_SUFFIX
- See Also:
-
-
Method Details
-
getRepoKey
- Returns:
- The repository key
-
getPath
String getPath()Returns the path within the repository - this excludes the repository key and includes the folder/file name. For instance, for the path'repoKey/path/to/file'
this method will return'path/to/file'
.- Returns:
- The path inside the repository. Empty string if repo path points to the root repo path.
-
getId
String getId()- Returns:
- The full repository path, like "repoKey:path/to"
-
toPath
String toPath()A path composed of the repository key and path.repoKey = "key", path = "path/to" returns "key/path/to" repoKey = "key", name = "" returns "key/"
- Returns:
- A path composed of the repository key and path
-
getName
String getName()- Returns:
- The name of the path as if it were a file (the string after the last '/' or '\')
-
getParent
- Returns:
- The repo path of the parent folder to this path. Null if this is the root path of the repository.
-
isRoot
boolean isRoot()- Returns:
- True if this repo path is the root path of the repository (i.e., the path part is empty)
-
isFile
boolean isFile()Whether this repo path is a path to a file, rather than a folder. Note that this function does not query Artifactory for this information, but will usually instead just look at the way the path is formatted: if path ends with a '/' character, it is considered a folder, and if not, it is considered a file.- Returns:
- True if this repo path represents a file
-
isFolder
boolean isFolder()Whether this repo path is a path to a folder, rather than a file. Note that this function does not query Artifactory for this information, but will usually instead just look at the way the path is formatted: if path ends with a '/' character, it is considered a folder, and if not, it is considered a file.- Returns:
- True if this repo path represents a folder
-
isChildOf
Whether this repoPath is a subset of provided parent path ex. given /FolderA/FolderB/file isChildOf(/FolderA/FolderB) -> true isChildOf(/FolderA/FolderC) -> false
-