Class TestFileUtils
java.lang.Object
org.eclipse.aether.internal.test.util.TestFileUtils
Provides utility methods to read and write (temporary) files.
- 
Method SummaryModifier 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- 
deleteTempFilesDeprecated.- Throws:
- IOException
 
- 
deleteFile- Throws:
- IOException
 
- 
mkdirsDeprecated.
- 
createTempFileDeprecated.use @TempDir (JUnit 5) Or TemporaryFolder (JUnit 4) instead- Throws:
- IOException- if an I/O error occurs
 
- 
createTempFileDeprecated.- Throws:
- IOException
 
- 
createTempDirDeprecated.use @TempDir (JUnit 5) Or TemporaryFolder (JUnit 4) insteadCreates a temporary directory.- Returns:
- the temporary directory
- Throws:
- IOException- if an I/O error occurs
 
- 
createTempDirDeprecated.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
 
- 
readBytesDeprecated.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
 
- 
writeBytesDeprecated.- Throws:
- IOException
 
- 
readString- Throws:
- IOException
 
- 
writeStringDeprecated.- 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
 
 
-