Package org.sakaiproject.search.util
Class FileUtils
- java.lang.Object
-
- org.sakaiproject.search.util.FileUtils
-
public class FileUtils extends Object
- Author:
- ieb
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFileUtils.RecurseAction
-
Constructor Summary
Constructors Constructor Description FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreateMarkerFile(File file)static voiddeleteAll(File f)delete all files under this file and including this filestatic Stringdigest(String token)static voidlistDirectory(File f)static voidpack(File source, String basePath, String replacePath, OutputStream output, boolean compress)pack a segment into the zipstatic voidrecurse(File f, FileUtils.RecurseAction action)static voidrecurseGrouped(File f, FileUtils.RecurseAction action)static voidunpack(InputStream source, File destination)unpack a segment from a zip
-
-
-
Method Detail
-
deleteAll
public static void deleteAll(File f) throws IOException
delete all files under this file and including this file- Parameters:
f-- Throws:
IOException
-
recurse
public static void recurse(File f, FileUtils.RecurseAction action) throws IOException
- Throws:
IOException
-
recurseGrouped
public static void recurseGrouped(File f, FileUtils.RecurseAction action) throws IOException
- Throws:
IOException
-
pack
public static void pack(File source, String basePath, String replacePath, OutputStream output, boolean compress) throws IOException
pack a segment into the zip- Parameters:
compress-addsi-- Throws:
IOException
-
unpack
public static void unpack(InputStream source, File destination) throws IOException
unpack a segment from a zip- Parameters:
addsi-packetStream-version-- Throws:
IOException
-
digest
public static String digest(String token) throws GeneralSecurityException, IOException
- Throws:
GeneralSecurityExceptionIOException
-
listDirectory
public static void listDirectory(File f) throws IOException
- Parameters:
parentFile-- Throws:
IOException
-
createMarkerFile
public static void createMarkerFile(File file) throws IOException
- Parameters:
file-- Throws:
IOException
-
-