public interface

Path

com.atlassian.stash.content.Path
Known Indirect Subclasses

Class Overview

A bean representation of a path

Public Methods

public String[] getComponents ()

Returns
  • an array of Strings representing the directories followed by a possible file name

public String getExtension ()

Returns
  • the file extension of the path (with no .), or null if there is no file extension

public String getName ()

Returns
  • everything after the last "/" (the last component), including the extension, or an empty string if there are no components

public String getParent ()

Returns
  • the parent string - everything up to the last component, or an empty string if root

public String toString ()

Returns
  • a string representation of the path - the components separated by "/"s