org.gradle.api.file
Class RelativePath
java.lang.Object
org.gradle.api.file.RelativePath
public class RelativePath
- extends java.lang.Object
Represents a relative path from a base directory to a file. Used in file copying to
represent both a source and target file path when copying files.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
RelativePath
public RelativePath(boolean endsWithFile,
java.lang.String... segments)
- CTOR
- Parameters:
endsWithFile
- - if true, the path ends with a file, otherwise a directorysegments
-
RelativePath
public RelativePath(boolean endsWithFile,
RelativePath parentPath,
java.lang.String... children)
getSegments
public java.lang.String[] getSegments()
segmentIterator
public java.util.ListIterator<java.lang.String> segmentIterator()
isFile
public boolean isFile()
getPathString
public java.lang.String getPathString()
getFile
public java.io.File getFile(java.io.File baseDir)
getLastName
public java.lang.String getLastName()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getParent
public RelativePath getParent()