/** * Constructor. * * @param name The file name. */ public RamFileData(final FileName name) { super(); this.children = Collections.synchronizedCollection(new ArrayList<RamFileData>()); this.clear(); if (name == null) { throw new IllegalArgumentException("name can not be null"); } this.name = name; }
/** * Constructor. * * @param name The file name. */ public RamFileData(final FileName name) { super(); this.children = Collections.synchronizedCollection(new ArrayList<RamFileData>()); this.clear(); if (name == null) { throw new IllegalArgumentException("name can not be null"); } this.name = name; }
/** * Constructor. * * @param name The file name. */ public RamFileData(final FileName name) { super(); this.children = Collections.synchronizedCollection(new ArrayList<RamFileData>()); this.clear(); if (name == null) { throw new IllegalArgumentException("name can not be null"); } this.name = name; }
/** * Constructor. * @param name The file name. */ public RamFileData(final FileName name) { super(); this.children = Collections.synchronizedCollection(new ArrayList<RamFileData>()); this.clear(); if (name == null) { throw new IllegalArgumentException("name can not be null"); } this.name = name; }
/** * Delete a file * * @param file * @throws FileSystemException */ void delete(final RamFileObject file) throws FileSystemException { // root is read only check if (file.getParent() == null) { throw new FileSystemException("unable to delete root"); } // Remove reference from cache this.cache.remove(file.getName()); // Notify the parent final RamFileObject parent = (RamFileObject) this.resolveFile(file.getParent().getName()); parent.getData().removeChild(file.getData()); parent.close(); // Close the file file.getData().clear(); file.close(); }
/** * Delete a file * * @param file * @throws FileSystemException */ void delete(final RamFileObject file) throws FileSystemException { // root is read only check FileSystemException.requireNonNull(file.getParent(), "unable to delete root"); // Remove reference from cache this.cache.remove(file.getName()); // Notify the parent final RamFileObject parent = (RamFileObject) this.resolveFile(file.getParent().getName()); parent.getData().removeChild(file.getData()); parent.close(); // Close the file file.getData().clear(); file.close(); }
/** * Delete a file * * @param file * @throws FileSystemException */ void delete(final RamFileObject file) throws FileSystemException { // root is read only check if (file.getParent() == null) { throw new FileSystemException("unable to delete root"); } // Remove reference from cache this.cache.remove(file.getName()); // Notify the parent final RamFileObject parent = (RamFileObject) this.resolveFile(file.getParent().getName()); parent.getData().removeChild(file.getData()); parent.close(); // Close the file file.getData().clear(); file.close(); }
/** * Delete a file * * @param file * @throws FileSystemException */ void delete(final RamFileObject file) throws FileSystemException { // root is read only check if (file.getParent() == null) { throw new FileSystemException("unable to delete root"); } // Remove reference from cache this.cache.remove(file.getName()); // Notify the parent final RamFileObject parent = (RamFileObject) this.resolveFile(file .getParent().getName()); parent.getData().removeChild(file.getData()); parent.close(); // Close the file file.getData().clear(); file.close(); }