core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystem.java
/**
     * Delete a file
     *
     * @param file
     * @throws FileSystemException
     */
Delete a file
@param file
@throws FileSystemException
Delete a file @param file @throws FileSystemException
void delete(RamFileObject file) throws FileSystemException
    {
        if (file.getParent() == null)
        {
            throw new FileSystemException("unable to delete root");
        }
        this.cache.remove(file.getName());
        RamFileObject parent = (RamFileObject) this.resolveFile(file
                .getParent().getName());
        parent.getData().removeChild(file.getData());
        parent.close();
        file.getData().clear();
        file.close();
    }
void delete ( RamFileObject file ) throws FileSystemException { if ( file . getParent ( ) == null ) { throw new FileSystemException ( "unable to delete root" ) ; } this . cache . remove ( file . getName ( ) ) ; RamFileObject parent = ( RamFileObject ) this . resolveFile ( file . getParent ( ) . getName ( ) ) ; parent . getData ( ) . removeChild ( file . getData ( ) ) ; parent . close ( ) ; file . getData ( ) . clear ( ) ; file . close ( ) ; }
Delete a file
 @param file
 @throws FileSystemException
Delete a file @param file @throws FileSystemException
// root is read only check // Remove reference from cache // Notify the parent // Close the file