fr.paris.lutece.util.filesystem
Class FileSystemUtil

java.lang.Object
  extended by fr.paris.lutece.util.filesystem.FileSystemUtil

public abstract class FileSystemUtil
extends java.lang.Object

This Service is used to manipulate Files and Directories in the File System.


Constructor Summary
FileSystemUtil()
           
 
Method Summary
static java.util.List<java.io.File> getFiles(java.lang.String strRoot, java.lang.String strDirectoryRelativePath)
          Returns the files of a directory, alphabetically ordered.
static java.util.List<java.io.File> getSubDirectories(java.lang.String strRoot, java.lang.String strDirectoryRelativePath)
          Returns the sub-directories of a directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemUtil

public FileSystemUtil()
Method Detail

getSubDirectories

public static java.util.List<java.io.File> getSubDirectories(java.lang.String strRoot,
                                                             java.lang.String strDirectoryRelativePath)
                                                      throws DirectoryNotFoundException
Returns the sub-directories of a directory.

Parameters:
strRoot - the root directory.
strDirectoryRelativePath - the parent directory.
Returns:
The list of sub-directories.
Throws:
DirectoryNotFoundException - if the directory does not exist.

getFiles

public static java.util.List<java.io.File> getFiles(java.lang.String strRoot,
                                                    java.lang.String strDirectoryRelativePath)
                                             throws DirectoryNotFoundException
Returns the files of a directory, alphabetically ordered.

Parameters:
strRoot - The root directory
strDirectoryRelativePath - The directory's path relative to the root directory.
Returns:
The list of files.
Throws:
DirectoryNotFoundException - if the directory does not exist.


Copyright © 2007 Mairie de Paris. All Rights Reserved.