fr.paris.lutece.plugins.xmlpage.util
Class XmlPageFileUtils

java.lang.Object
  extended by fr.paris.lutece.plugins.xmlpage.util.XmlPageFileUtils

public class XmlPageFileUtils
extends java.lang.Object

File Utilities for XmlPage Plugin


Constructor Summary
protected XmlPageFileUtils()
          Default constructor
 
Method Summary
static void copyFile(java.lang.String strDirectory, java.lang.String strFileName, java.lang.String strNewDirectory)
          Copy file from directory strDirectory to directory strNewDirectory
static boolean createFile(java.lang.String strFilePath)
          Create a file using the path given in parameter
static boolean makeDirectory(java.lang.String strDirectoryPath)
          Make a directory using the path given in parameter
static boolean removeDirectory(java.io.File fDirectoryPath)
          Delete a directory and everything in it
static boolean removeDirectory(java.lang.String strDirectoryPath)
          Delete a directory and everything in it
static boolean removeFile(java.lang.String strFilePath)
          Delete a file
static boolean renameDirectory(java.lang.String strOriginalDirectory, java.lang.String strNewDirectory)
          Rename a file or directory with another name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlPageFileUtils

protected XmlPageFileUtils()
Default constructor

Method Detail

makeDirectory

public static boolean makeDirectory(java.lang.String strDirectoryPath)
Make a directory using the path given in parameter

Parameters:
strDirectoryPath - the path of new directory
Returns:
true if and only if the directory was created, along with all necessary parent directories; false otherwise

createFile

public static boolean createFile(java.lang.String strFilePath)
Create a file using the path given in parameter

Parameters:
strFilePath - file path to create
Returns:
true if the named file does not exist and was successfully created; false if the named file already exists

copyFile

public static void copyFile(java.lang.String strDirectory,
                            java.lang.String strFileName,
                            java.lang.String strNewDirectory)
Copy file from directory strDirectory to directory strNewDirectory

Parameters:
strDirectory - original directory contening the file
strFileName - file name to copy
strNewDirectory - destination directory for the copied file

renameDirectory

public static boolean renameDirectory(java.lang.String strOriginalDirectory,
                                      java.lang.String strNewDirectory)
Rename a file or directory with another name

Parameters:
strOriginalDirectory - original directory path
strNewDirectory - new directory path
Returns:
true if and only if the renaming succeeded; false otherwise

removeFile

public static boolean removeFile(java.lang.String strFilePath)
Delete a file

Parameters:
strFilePath - path of deleted file
Returns:
true if and only if the file is successfully deleted; false otherwise

removeDirectory

public static boolean removeDirectory(java.lang.String strDirectoryPath)
Delete a directory and everything in it

Parameters:
strDirectoryPath - path of deleted directory
Returns:
true if and only if the directory is successfully deleted; false otherwise

removeDirectory

public static boolean removeDirectory(java.io.File fDirectoryPath)
Delete a directory and everything in it

Parameters:
fDirectoryPath - File of directory
Returns:
true if and only if the file or directory is successfully deleted; false otherwise


Copyright © 2008 Mairie de Paris. All Rights Reserved.