org.fuin.kickstart4j
Class MkDir

java.lang.Object
  extended by org.fuin.kickstart4j.MkDir
All Implemented Interfaces:
org.fuin.utils4j.ToDebugStringCapable

public final class MkDir
extends Object
implements org.fuin.utils4j.ToDebugStringCapable

A directory inside a base directory. This class is immutable.


Constructor Summary
MkDir(File baseDir, File dir)
          Constructor with base directory and directory.
MkDir(String path)
          Constructor with all arguments.
 
Method Summary
 boolean equals(Object obj)
          
 String getCanonicalPath(File baseDir)
          Returns the absolute directory based on a given base directory as String.
 File getDestDir(File baseDir)
          Returns the absolute file based on a given base directory.
 String getPath()
          Returns the path of the file.
 String getSlashPath()
          Returns the path with a slash ("/") used as separator.
 int hashCode()
          
 String toDebugString()
          
 String toString()
          
 String toXML()
          Creates an XML representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MkDir

public MkDir(File baseDir,
             File dir)
Constructor with base directory and directory.

Parameters:
baseDir - Base directory for calculating the relative path.
dir - Directory inside the base directory.

MkDir

public MkDir(String path)
Constructor with all arguments.

Parameters:
path - Path relative to the base directory.
Method Detail

getPath

public final String getPath()
Returns the path of the file.

Returns:
Path relative to the base directory.

getCanonicalPath

public final String getCanonicalPath(File baseDir)
Returns the absolute directory based on a given base directory as String.

Parameters:
baseDir - Base directory.
Returns:
Path inside the base directory.

getDestDir

public final File getDestDir(File baseDir)
Returns the absolute file based on a given base directory.

Parameters:
baseDir - Base directory.
Returns:
File inside the base directory.

getSlashPath

public final String getSlashPath()
Returns the path with a slash ("/") used as separator.

Returns:
Path.

toXML

public final String toXML()
Creates an XML representation of the object.

Returns:
XML for element "mkdir"

hashCode

public final int hashCode()

Overrides:
hashCode in class Object

equals

public final boolean equals(Object obj)

Overrides:
equals in class Object

toDebugString

public final String toDebugString()

Specified by:
toDebugString in interface org.fuin.utils4j.ToDebugStringCapable

toString

public final String toString()

Overrides:
toString in class Object


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.