Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


oracle.stellent.wcm.common.io
Class FilePath

java.lang.Object
  extended by oracle.stellent.wcm.common.io.FilePath


public class FilePath
extends java.lang.Object

FilePath is an object to parse a file path into its distinct parts


Constructor Summary
FilePath(java.lang.String path)
           
FilePath(java.lang.String path, char seperator)
           

 

Method Summary
 java.lang.String getDirectory()
          Retrieve the directory path of the file (i.e.
 java.lang.String getExtension()
           
 java.lang.String getFileName()
          Retrieve the filename from the path with no extension, i.e.
 java.lang.String getFileName(boolean excludeExtension)
          Retrieve the filename from the path, i.e.
 java.lang.String getPath()
           
protected  void parse()
           
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

FilePath

public FilePath(java.lang.String path)

FilePath

public FilePath(java.lang.String path,
                char seperator)

Method Detail

parse

protected void parse()

getExtension

public java.lang.String getExtension()
Returns:
the file extension (i.e. /test/foo/bar.txt returns .txt)

getPath

public java.lang.String getPath()
Returns:
the full path (including file name) to the file

getDirectory

public java.lang.String getDirectory()
Retrieve the directory path of the file (i.e. /a/b/c.html -> /a/b/c)
Returns:
the path to the file directory

getFileName

public java.lang.String getFileName()
Retrieve the filename from the path with no extension, i.e. /test/some/file.txt returns file
Returns:
the filename

getFileName

public java.lang.String getFileName(boolean excludeExtension)
Retrieve the filename from the path, i.e. /test/some/file.txt returns file.txt
Parameters:
excludeExtension - true to exclude the extension in the filename
Returns:
the filename

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.