public interface

Path

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

Class Overview

A bean representation of a path

Summary

Public Methods
@Nonnull String[] getComponents()
@Nullable String getExtension()
@Nonnull String getName()
@Nullable String getParent()
@Nonnull String toString()

Public Methods

@Nonnull public String[] getComponents ()

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

@Nullable public String getExtension ()

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

@Nonnull public String getName ()

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

@Nullable public String getParent ()

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

@Nonnull public String toString ()

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