info.magnolia.cms.util
Class PathUtil

java.lang.Object
  extended by info.magnolia.cms.util.PathUtil

public class PathUtil
extends Object

Utility class used to handle paths for documents in DMS.

Version:
$Revision$ ($Author$)
Author:
Philipp Bracher

Constructor Summary
PathUtil()
           
 
Method Summary
static String addLeadingSlash(String path)
           
static String createPath(String path, String label)
           
static String getExtension(String path)
          Returns the extension of the file denoted by the path excluding the dot.
static String getFileName(String path)
           
static String getFolder(String path)
           
static String stripExtension(String path)
          Removes the extension from a path if one exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathUtil

public PathUtil()
Method Detail

createPath

public static String createPath(String path,
                                String label)

addLeadingSlash

public static String addLeadingSlash(String path)

getFolder

public static String getFolder(String path)

getFileName

public static String getFileName(String path)

getExtension

public static String getExtension(String path)
Returns the extension of the file denoted by the path excluding the dot. More specifically returns the part of the string after the last dot. If there's no dot in the path it returns the empty string.


stripExtension

public static String stripExtension(String path)
Removes the extension from a path if one exists.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.