org.kuali.common.util
Class FileSystemUtils

java.lang.Object
  extended by org.kuali.common.util.FileSystemUtils

public class FileSystemUtils
extends Object


Constructor Summary
FileSystemUtils()
           
 
Method Summary
protected static void copyFiles(File srcDir, List<File> files, File dstDir)
           
protected static List<File> getAllFiles(File dir)
           
protected static List<File> getFullPaths(File dir, List<String> relativePaths)
           
protected static String getRelativePath(File dir, File file)
           
protected static List<String> getRelativePaths(File dir, List<File> files)
           
static MonitorTextFileResult monitorTextFile(File file, String token, int intervalMillis, int timeoutMillis, String encoding)
          Examine the contents of a text file, stopping as soon as it contains token, or timeout is exceeded, whichever comes first.
static List<SyncResult> syncFiles(List<SyncRequest> requests)
           
static SyncResult syncFiles(SyncRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemUtils

public FileSystemUtils()
Method Detail

monitorTextFile

public static MonitorTextFileResult monitorTextFile(File file,
                                                    String token,
                                                    int intervalMillis,
                                                    int timeoutMillis,
                                                    String encoding)
Examine the contents of a text file, stopping as soon as it contains token, or timeout is exceeded, whichever comes first.


syncFiles

public static List<SyncResult> syncFiles(List<SyncRequest> requests)
                                  throws IOException
Throws:
IOException

syncFiles

public static SyncResult syncFiles(SyncRequest request)
                            throws IOException
Throws:
IOException

copyFiles

protected static void copyFiles(File srcDir,
                                List<File> files,
                                File dstDir)
                         throws IOException
Throws:
IOException

getFullPaths

protected static List<File> getFullPaths(File dir,
                                         List<String> relativePaths)

getRelativePaths

protected static List<String> getRelativePaths(File dir,
                                               List<File> files)

getRelativePath

protected static String getRelativePath(File dir,
                                        File file)

getAllFiles

protected static List<File> getAllFiles(File dir)


Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.