de.dv.sbu
Class SourceFileInformation

java.lang.Object
  extended by de.dv.sbu.SourceFileInformation

public class SourceFileInformation
extends java.lang.Object

Information of a file relative to some root directory.

Author:
Daniel Vogtland

Constructor Summary
SourceFileInformation(java.io.File file, java.lang.String relativePath)
          Creates a new instance.
 
Method Summary
 java.io.File getFile()
          Returns the underlying File object.
 java.lang.String getName()
          The file name without the last suffix - if present.
 java.lang.String getRelativePath()
          The relative path from the root node including the file name and suffix.
 java.lang.String getSuffix()
          Returns the file's suffix - if present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceFileInformation

public SourceFileInformation(java.io.File file,
                             java.lang.String relativePath)
Creates a new instance. The values of name and suffix will be computed from the given file. Path separator is '/'.

Parameters:
file - The source file object.
relativePath - The relative path from the root directory beginning with a /.
Method Detail

getFile

public java.io.File getFile()
Returns the underlying File object.

Returns:
The related file.

getRelativePath

public java.lang.String getRelativePath()
The relative path from the root node including the file name and suffix.

Returns:
The file's relative path.

getName

public java.lang.String getName()
The file name without the last suffix - if present.

Returns:
The file name excluding the extension.

getSuffix

public java.lang.String getSuffix()
Returns the file's suffix - if present.

Returns:
The file's suffix.