I have a Java test which uses File as follows to access a file:
File localFile = new File("/path/to/my/file/file.txt");
Because Im referencing a file in a particular location I must have that file in my project or the test will fail. Is there any I can generate a File of a specific size as part of my test?
This thread uses RandomAccessFile but I don't think that's what I'm looking for.