@Test
public void testMkdirs() throws IOException {

    // Require the 'create directory' operation to be supported
    if(!tempFile.isFileOperationSupported(FileOperation.CREATE_DIRECTORY))
    return;
    // Assert that a directory can be created when the file doesn't already exist (without throwing an IOException)
    AbstractFile dir1 = tempFile.getDirectChild("dir1");
    AbstractFile dir2 = dir1.getDirectChild("dir2");
    AbstractFile dir2b = dir1.getChild("dir2"+dir1.getSeparator());     // Same file with a trailing separator
    dir2.mkdirs();
    // Assert that the file exists after the directory has been created
    assert dir2.exists();
    assert dir2.isDirectory();
    assert dir2b.exists();
    assert dir2b.isDirectory();
    // Delete 'dir2' and perform the same test. The difference with the previous test is that 'temp' and 'dir1' exist.
    dir2.delete();
    assert !dir2.exists();
    assert !dir2.isDirectory();
    assert !dir2b.exists();
    assert !dir2b.isDirectory();
    dir2.mkdirs();
    assert dir2.exists();
    assert dir2.isDirectory();
    assert dir2b.exists();
    assert dir2b.isDirectory();
    // Assert that an IOException is thrown when the directory already exists
    boolean ioExceptionThrown = false;
    try {
        dir2.mkdirs();
    }
    catch(IOException e) {
        ioExceptionThrown = true;
    }
    assert ioExceptionThrown;
    // Assert that an IOException is thrown when a regular file exists
    dir2.delete();
    dir2.mkfile();
    ioExceptionThrown = false;
    try {
        dir2.mkdir();
    }
    catch(IOException e) {
        ioExceptionThrown = true;
    }
    assert ioExceptionThrown;
}