Ouzo\Utilities\Files::delete PHP Метод

delete() публичный статический Метод

Deletes file, throws FileNotFoundException if the file does not exist.
public static delete ( string $path ) : boolean
$path string
Результат boolean
    public static function delete($path)
    {
        if (!self::exists($path)) {
            throw new FileNotFoundException('Cannot find file: ' . $path);
        }
        return unlink($path);
    }

Usage Example

Пример #1
0
 protected function tearDown()
 {
     if (Files::exists($this->controllerPath)) {
         Files::delete($this->controllerPath);
     }
     parent::tearDown();
 }
All Usage Examples Of Ouzo\Utilities\Files::delete