@Test public void testAbsolutePathsAreAlsoRelativeToMountPoint() throws Exception { FileSystem fs = getImplementation(); fs.writeFile("file.txt", "content".getBytes()); File expectedFile = new File(mountPoint, "file.txt"); FileInputStream stream = new FileInputStream(expectedFile); byte[] actual = IO.readIntoByteArray(stream); assertEquals("content", new String(actual)); }
public void writeFile(String path, byte[] content) throws IOException { writeFile(path, new ByteArrayInputStream(content)); }
DiskFileSystem implements FileSystem { public void writeFile(String path, byte[] content) throws IOException { writeFile(path, new ByteArrayInputStream(content)); } }
DiskFileSystem implements FileSystem { public void writeFile(String path, byte[] content) throws IOException { writeFile(path, new ByteArrayInputStream(content)); } DiskFileSystem(File mountPoint); }
DiskFileSystem implements FileSystem { public void writeFile(String path, byte[] content) throws IOException { writeFile(path, new ByteArrayInputStream(content)); } DiskFileSystem(File mountPoint); void copy(String from, String to); void delete(String path); boolean exists(String path); void move(String from, String to); byte[] readFileAsBytes(String path); Reader readFileAsReader(String path); InputStream readFileAsStream(String path); void writeFile(String path, byte[] content); void writeFile(String path, InputStream content); void writeFile(String path, Reader content); }
DiskFileSystem implements FileSystem { public void writeFile(String path, byte[] content) throws IOException { writeFile(path, new ByteArrayInputStream(content)); } DiskFileSystem(File mountPoint); void copy(String from, String to); void delete(String path); boolean exists(String path); void move(String from, String to); byte[] readFileAsBytes(String path); Reader readFileAsReader(String path); InputStream readFileAsStream(String path); void writeFile(String path, byte[] content); void writeFile(String path, InputStream content); void writeFile(String path, Reader content);  }