HashIndex.java
/**
   * Deletes the index file from the database, freeing all of its pages.
   */
Deletes the index file from the database, freeing all of its pages.
Deletes the index file from the database freeing all of its pages .
public void deleteFile() {
	  PageId currentPageId = new PageId();
	  Page hashDirectoryPage = new Page();		  
	  Minibase.BufferManager.pinPage(headId, hashDirectoryPage, PIN_DISKIO);
	  for (int i = 0; i < BUCKETS_AMOUNT; i++)
	  {
		  currentPageId.pid = hashDirectoryPage.getIntValue(i * INT_SIZE);
		  HashBucketPage currentPage = new HashBucketPage();
		  if (INVALID_PAGEID != currentPageId.pid)
		  {
			  Minibase.BufferManager.pinPage(currentPageId, currentPage, PIN_DISKIO);
			  currentPage.deleteNextPages();
			  Minibase.BufferManager.unpinPage(currentPageId, UNPIN_CLEAN);
			  Minibase.BufferManager.freePage(currentPageId);
		  }  
	  }
	  Minibase.DiskManager.delete_file_entry(fileName);
  }
public void deleteFile ( ) { PageId currentPageId = new PageId ( ) ; Page hashDirectoryPage = new Page ( ) ; Minibase . BufferManager . pinPage ( headId , hashDirectoryPage , PIN_DISKIO ) ; for ( int i = 0 ; i < BUCKETS_AMOUNT ; i ++ ) { currentPageId . pid = hashDirectoryPage . getIntValue ( i * INT_SIZE ) ; HashBucketPage currentPage = new HashBucketPage ( ) ; if ( INVALID_PAGEID != currentPageId . pid ) { Minibase . BufferManager . pinPage ( currentPageId , currentPage , PIN_DISKIO ) ; currentPage . deleteNextPages ( ) ; Minibase . BufferManager . unpinPage ( currentPageId , UNPIN_CLEAN ) ; Minibase . BufferManager . freePage ( currentPageId ) ; } } Minibase . DiskManager . delete_file_entry ( fileName ) ; }
Deletes the index file from the database, freeing all of its pages.
Deletes the index file from the database freeing all of its pages .
// Load the directory page // Traverse the directory, deleting the bucket pages // Traverse the bucket, deleting all the extended bucket pages // Free the primary bucket page  // Remove the entry from the library