Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| 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

    class RelativePath

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.

author:
  Steve Appling

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

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

Methods inherited from class java.lang.Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Constructor Detail

### RelativePath

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

  CTOR
  param:
    endsWithFile - if true, the path ends with a file, otherwise a directory
  param:
    segments

### RelativePath

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

Method Detail

### equals

    @Override
    public boolean equals(java.lang.Object o)

### getFile

    public File getFile(File baseDir)

### getLastName

    public java.lang.String getLastName()

### getParent

    public RelativePath getParent()

### getPathString

    public java.lang.String getPathString()

### getSegments

    public java.lang.String[] getSegments()

### hashCode

    @Override
    public int hashCode()

### isFile

    public boolean isFile()

### segmentIterator

    public ListIterator segmentIterator()

### toString

    @Override
    public java.lang.String toString()

Groovy Documentation