@Test
  public void testDelete_directory_cantDeleteNonEmptyDirectory() throws IOException {
    Files.createDirectories(path("/foo/bar"));

    try {
      Files.delete(path("/foo"));
      fail();
    } catch (DirectoryNotEmptyException expected) {
      assertThat(expected.getFile()).isEqualTo("/foo");
    }

    try {
      Files.deleteIfExists(path("/foo"));
      fail();
    } catch (DirectoryNotEmptyException expected) {
      assertThat(expected.getFile()).isEqualTo("/foo");
    }
  }
");
    assertThatPath("foo/bar").doesNotMatch("glob:/**");
    assertThatPath("/foo/bar/baz/stuff").matches("glob:/foo/**");
    assertThatPath("/foo/bar/baz/stuff").matches("glob:/*
jimfs/src/test/java/com/google/common/jimfs/JimfsUnixLikeFileSystemTest.java