@Test public void testUnlink_nonExistentNameFails() { try { dir.unlink(Name.simple("bar")); fail(); } catch (IllegalArgumentException expected) { } }
public void unlink(Name name) { DirectoryEntry entry = remove(checkNotReserved(name, "unlink")); entry.file().unlinked(); }
Directory extends File implements Iterable<DirectoryEntry> { public void unlink(Name name) { DirectoryEntry entry = remove(checkNotReserved(name, "unlink")); entry.file().unlinked(); } }
Directory extends File implements Iterable<DirectoryEntry> { public void unlink(Name name) { DirectoryEntry entry = remove(checkNotReserved(name, "unlink")); entry.file().unlinked(); } private  Directory(int id); private  Directory(int id, Name rootName); }
Directory extends File implements Iterable<DirectoryEntry> { public void unlink(Name name) { DirectoryEntry entry = remove(checkNotReserved(name, "unlink")); entry.file().unlinked(); } private  Directory(int id); private  Directory(int id, Name rootName); static Directory create(int id); static Directory createRoot(int id, Name name); DirectoryEntry entryInParent(); Directory parent(); boolean isEmpty(); @NullableDecl DirectoryEntry get(Name name); void link(Name name, File file); void unlink(Name name); ImmutableSortedSet<Name> snapshot(); @Override Iterator<DirectoryEntry> iterator(); }
Directory extends File implements Iterable<DirectoryEntry> { public void unlink(Name name) { DirectoryEntry entry = remove(checkNotReserved(name, "unlink")); entry.file().unlinked(); } private  Directory(int id); private  Directory(int id, Name rootName); static Directory create(int id); static Directory createRoot(int id, Name name); DirectoryEntry entryInParent(); Directory parent(); boolean isEmpty(); @NullableDecl DirectoryEntry get(Name name); void link(Name name, File file); void unlink(Name name); ImmutableSortedSet<Name> snapshot(); @Override Iterator<DirectoryEntry> iterator();  }