Class TestFileUtils
java.lang.Object
org.eclipse.aether.internal.test.util.TestFileUtils
Provides utility methods to read and write (temporary) files.
- 
Method Summary
Modifier and TypeMethodDescriptionstatic longstatic FileDeprecated.use @TempDir (JUnit 5) Or TemporaryFolder (JUnit 4) insteadstatic FilecreateTempDir(String suffix) Deprecated.use@TempDir(JUnit 5) orTemporaryFolder(JUnit 4) insteadstatic FilecreateTempFile(byte[] pattern, int repeat) Deprecated.static FilecreateTempFile(String contents) Deprecated.use @TempDir (JUnit 5) Or TemporaryFolder (JUnit 4) insteadstatic voiddeleteFile(File file) static voidDeprecated.static booleanDeprecated.static byte[]Deprecated.useFiles.readAllBytes(Path)insteadstatic voidreadProps(File file, Properties props) static StringreadString(File file) static voidwriteBytes(File file, byte[] pattern, int repeat) Deprecated.static voidwriteProps(File file, Properties props) static voidwriteString(File file, String content) Deprecated.static voidwriteString(File file, String content, long timestamp) Deprecated. 
- 
Method Details
- 
deleteTempFiles
Deprecated.- Throws:
 IOException
 - 
deleteFile
- Throws:
 IOException
 - 
mkdirs
Deprecated. - 
createTempFile
Deprecated.use @TempDir (JUnit 5) Or TemporaryFolder (JUnit 4) instead- Throws:
 IOException- if an I/O error occurs
 - 
createTempFile
Deprecated.- Throws:
 IOException
 - 
createTempDir
Deprecated.use @TempDir (JUnit 5) Or TemporaryFolder (JUnit 4) insteadCreates a temporary directory.- Returns:
 - the temporary directory
 - Throws:
 IOException- if an I/O error occurs
 - 
createTempDir
Deprecated.use@TempDir(JUnit 5) orTemporaryFolder(JUnit 4) insteadCreates a temporary directory.- Returns:
 - the temporary directory
 - Throws:
 IOException- if an I/O error occurs
 - 
copyFile
- Throws:
 IOException
 - 
readBytes
Deprecated.useFiles.readAllBytes(Path)insteadReads the contents of a file into a byte array.- Parameters:
 file- the file to read- Returns:
 - the contents of the file as a byte array
 - Throws:
 IOException- if an I/O error occurs
 - 
writeBytes
Deprecated.- Throws:
 IOException
 - 
readString
- Throws:
 IOException
 - 
writeString
Deprecated.- Throws:
 IOException
 - 
writeString
@Deprecated public static void writeString(File file, String content, long timestamp) throws IOException Deprecated.- Throws:
 IOException
 - 
readProps
- Throws:
 IOException
 - 
writeProps
- Throws:
 IOException
 
 -