common/models/resources/File.php
public function clearDisk() {

		$filePath		= $this->getFilePath();
		$mediumPath		= $this->getMediumPath();
		$thumbPath		= $this->getThumbPath();

		// Delete from disk
		if( $filePath && file_exists( $filePath ) && is_file( $filePath ) ) {

			unlink( $filePath );
		}

		if( $mediumPath && file_exists( $mediumPath ) && is_file( $mediumPath ) ) {

			unlink( $mediumPath );
		}

		if( $thumbPath && file_exists( $thumbPath ) && is_file( $thumbPath ) ) {

			unlink( $thumbPath );
		}
	}
public function clearDisk() {

		$filePath		= $this->getFilePath();
		$mediumPath		= $this->getMediumPath();
		$thumbPath		= $this->getThumbPath();

		// Delete from disk
		if( $filePath && file_exists( $filePath ) && is_file( $filePath ) ) {

			unlink( $filePath );
		}

		if( $mediumPath && file_exists( $mediumPath ) && is_file( $mediumPath ) ) {

			unlink( $mediumPath );
		}

		if( $thumbPath && file_exists( $thumbPath ) && is_file( $thumbPath ) ) {

			unlink( $thumbPath );
		}
	}
public function clearDisk ( ) { $ filePath = $ this -> getFilePath ( ) ; $ mediumPath = $ this -> getMediumPath ( ) ; $ thumbPath = $ this -> getThumbPath ( ) ; // Delete from disk if ( $ filePath && file_exists ( $ filePath ) && is_file ( $ filePath ) ) { unlink ( $ filePath ) ; } if ( $ mediumPath && file_exists ( $ mediumPath ) && is_file ( $ mediumPath ) ) { unlink ( $ mediumPath ) ; } if ( $ thumbPath && file_exists ( $ thumbPath ) && is_file ( $ thumbPath ) ) { unlink ( $ thumbPath ) ; } }
Delete all the associated files from disk. Useful while updating file.

@return void
Delete all the associated files from disk . Useful while updating file .