com.wewebu.ow.server.util
Class OwFileUtil

java.lang.Object
  extended by com.wewebu.ow.server.util.OwFileUtil

public class OwFileUtil
extends Object

Utility class for file access and manipulation.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwFileUtil()
           
 
Method Summary
static String getFileDir(String filepath_p)
          get the file directory without name of the given path e.g.: c:\temp\myfile.txt => c:\temp\
static String getFileExt(String filepath_p)
          get the file extension of the given path e.g.: c:\temp\myfile.txt => myfile.txt
static String getFileName(String filepath_p)
          get the file title with extension of the given path e.g.: c:\temp\myfile.txt => myfile.txt
static String getFileTitle(String filepath_p)
          get the file title without extension of the given path e.g.: c:\temp\myfile.txt => myfile
static String replaceExtension(String filepath_p, String newextension_p)
          replace extension of the given filepath e.g.: c:\temp\myfile.txt,properties => c:\temp\myfile.properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwFileUtil

public OwFileUtil()
Method Detail

replaceExtension

public static String replaceExtension(String filepath_p,
                                      String newextension_p)
replace extension of the given filepath e.g.: c:\temp\myfile.txt,properties => c:\temp\myfile.properties

Parameters:
filepath_p -
Returns:
String title

getFileTitle

public static String getFileTitle(String filepath_p)
get the file title without extension of the given path e.g.: c:\temp\myfile.txt => myfile

Parameters:
filepath_p -
Returns:
String title

getFileName

public static String getFileName(String filepath_p)
get the file title with extension of the given path e.g.: c:\temp\myfile.txt => myfile.txt

Parameters:
filepath_p -
Returns:
String name

getFileExt

public static String getFileExt(String filepath_p)
get the file extension of the given path e.g.: c:\temp\myfile.txt => myfile.txt

Parameters:
filepath_p -
Returns:
String extension of "" if file has no extension

getFileDir

public static String getFileDir(String filepath_p)
get the file directory without name of the given path e.g.: c:\temp\myfile.txt => c:\temp\

Parameters:
filepath_p -
Returns:
String directory with ending backslash


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.