de.unihalle.informatik.Alida.helpers
Class ALDFilePathManipulator

java.lang.Object
  extended by de.unihalle.informatik.Alida.helpers.ALDFilePathManipulator

public class ALDFilePathManipulator
extends Object

Class providing helpers to manipulate file and directory path names.

Author:
moeller, posch, misiak

Constructor Summary
ALDFilePathManipulator()
           
 
Method Summary
static String getExtension(String str)
          Gets extension from the filename, if any.
static String getFileName(String str)
          Returns name without leading directories or file description (extension).
static String getPath(String str)
          Get path.
static String removeExtension(String str)
          Removes preceding path elements and extension from filename, if any.
static String removeLeadingDirectories(String str)
          Remove all leading pathname components from a filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ALDFilePathManipulator

public ALDFilePathManipulator()
Method Detail

removeExtension

public static String removeExtension(String str)
Removes preceding path elements and extension from filename, if any.

Parameters:
str - Filename to process.
Returns:
Filename without extension.

getExtension

public static String getExtension(String str)
Gets extension from the filename, if any.

Parameters:
str - Filename to be processed.
Returns:
Extension or empty string, if no extension present.

removeLeadingDirectories

public static String removeLeadingDirectories(String str)
Remove all leading pathname components from a filename.

Parameters:
str - Filename to be processed.
Returns:
Tail of the filename.

getPath

public static String getPath(String str)
Get path.

Parameters:
str - Filename to be processed.
Returns:
Path of provided filename.

getFileName

public static String getFileName(String str)
Returns name without leading directories or file description (extension).

Parameters:
str - Filename to be processed.
Returns:
Filename without leading directories and file extension.


Copyright © 2010–2014 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.