src/libraries/adapters/FileSystemLocal.php
/**
    * Deletes a photo (and all generated versions) from the file system.
    * To get a list of all the files to delete we first have to query the database and find out what versions exist.
    *
    * @param string $id ID of the photo to delete
    * @return boolean
    */
Deletes a photo (and all generated versions) from the file system.
To get a list of all the files to delete we first have to query the database and find out what versions exist.

@param string $id ID of the photo to delete
@return boolean
Deletes a photo ( and all generated versions ) from the file system . To get a list of all the files to delete we first have to query the database and find out what versions exist . @param string $id ID of the photo to delete @return boolean
public function deletePhoto($photo)
  {
    foreach($photo as $key => $value)
    {
      if(strncmp($key, 'path', 4) === 0) {
        $path = self::normalizePath($value);
        if(file_exists($path) && !@unlink($path))
          return false;
      }
    }
    return true;
  }
public function deletePhoto ( $ photo ) { foreach ( $ photo as $ key => $ value ) { if ( strncmp ( $ key , 'path' , 4 ) === 0 ) { $ path = self :: normalizePath ( $ value ) ; if ( file_exists ( $ path ) && ! @ unlink ( $ path ) ) return false ; } } return true ; }
Deletes a photo (and all generated versions) from the file system.
Deletes a photo ( and all generated versions ) from the file system .