Modifier and Type | Field and Description |
---|---|
protected static int |
MAX_DIR_NAME_LENGTH |
protected static int |
MAX_FILE_NAME_LENGTH |
Modifier and Type | Method and Description |
---|---|
static void |
copyFile(File src,
File dest) |
static void |
copyFile(File src,
File dest,
FilenameFilter filter) |
static void |
copyInputStream(InputStream in,
OutputStream out) |
static void |
copySingleFile(File src,
File dest) |
static boolean |
delete(File top) |
static boolean |
deleteChildren(File parent) |
static boolean |
deleteFile(File fileToDelete) |
static String |
getDefaultDataDirectory() |
static String |
getDefaultDirectoryPrefix()
Allows a system property to be used to overload the default data
directory which can be useful for forcing the test cases to use a target/
prefix
|
static String |
getDefaultStoreDirectory() |
static int |
getMaxDirNameLength() |
static int |
getMaxFileNameLength() |
static void |
mkdirs(File dir) |
static void |
moveFile(File src,
File targetDirectory) |
static void |
moveFiles(File srcDirectory,
File targetDirectory,
FilenameFilter filter) |
static String |
toFileSystemDirectorySafeName(String name)
Converts any string into a string that is safe to use as a file name.
|
static String |
toFileSystemSafeName(String name) |
static String |
toFileSystemSafeName(String name,
boolean dirSeparators,
int maxFileLength)
Converts any string into a string that is safe to use as a file name.
|
protected static final int MAX_DIR_NAME_LENGTH
protected static final int MAX_FILE_NAME_LENGTH
public static String getDefaultDataDirectory()
public static String getDefaultStoreDirectory()
public static String getDefaultDirectoryPrefix()
public static String toFileSystemDirectorySafeName(String name)
name
- public static String toFileSystemSafeName(String name)
public static String toFileSystemSafeName(String name, boolean dirSeparators, int maxFileLength)
name
- dirSeparators
- maxFileLength
- public static boolean deleteFile(File fileToDelete)
public static boolean deleteChildren(File parent)
public static void moveFile(File src, File targetDirectory) throws IOException
IOException
public static void moveFiles(File srcDirectory, File targetDirectory, FilenameFilter filter) throws IOException
IOException
public static void copyFile(File src, File dest) throws IOException
IOException
public static void copyFile(File src, File dest, FilenameFilter filter) throws IOException
IOException
public static void copySingleFile(File src, File dest) throws IOException
IOException
public static void copyInputStream(InputStream in, OutputStream out) throws IOException
IOException
public static int getMaxDirNameLength()
public static int getMaxFileNameLength()
public static void mkdirs(File dir) throws IOException
IOException
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.