/** * Adds the given entry to the directory, overwriting an existing entry with the same name if * such an entry exists. */ private void forcePut(DirectoryEntry entry) { put(entry, true); }
/** * Adds the given entry to the directory. * * @throws IllegalArgumentException if an entry with the given entry's name already exists in the * directory */ @VisibleForTesting void put(DirectoryEntry entry) { put(entry, false); }
private Directory(int id) { super(id); put(new DirectoryEntry(this, Name.SELF, this)); }
/** * Links the given name to the given file in this directory. * * @throws IllegalArgumentException if {@code name} is a reserved name such as "." or if an * entry already exists for the name */ public void link(Name name, File file) { DirectoryEntry entry = new DirectoryEntry(this, checkNotReserved(name, "link"), file); put(entry); file.linked(entry); }
/** * Adds the given entry to the directory, overwriting an existing entry with the same name if * such an entry exists. */ private void forcePut(DirectoryEntry entry) { put(entry, true); }
/** * Adds the given entry to the directory. * * @throws IllegalArgumentException if an entry with the given entry's name already exists in the * directory */ @VisibleForTesting void put(DirectoryEntry entry) { put(entry, false); }
private Directory(int id) { super(id); put(new DirectoryEntry(this, Name.SELF, this)); }
/** * Links the given name to the given file in this directory. * * @throws IllegalArgumentException if {@code name} is a reserved name such as "." or if an * entry already exists for the name */ public void link(Name name, File file) { DirectoryEntry entry = new DirectoryEntry(this, checkNotReserved(name, "link"), file); put(entry); file.linked(entry); }