Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Constructor Summary
`RelativePath(boolean endsWithFile, RelativePath parentPath, java.lang.String... children)`
`RelativePath(boolean endsWithFile, java.lang.String... segments)` CTOR

Method Summary
`boolean` | `equals(java.lang.Object o)`
`java.io.File` | `getFile(java.io.File baseDir)`
`java.lang.String` | `getLastName()`
`RelativePath` | `getParent()`
`java.lang.String` | `getPathString()`
`java.lang.String[]` | `getSegments()`
`int` | `hashCode()`
`boolean` | `isFile()`
`java.util.ListIterator<java.lang.String>` | `segmentIterator()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RelativePath

    public RelativePath(boolean endsWithFile,
                        java.lang.String... segments)

  CTOR

  Parameters:
    `endsWithFile` - - if true, the path ends with a file, otherwise a directory
    `segments` -

### RelativePath

    public RelativePath(boolean endsWithFile,
                        RelativePath parentPath,
                        java.lang.String... children)

Method Detail

### 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()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD