src/Webiny/BackupService/Lib/Cleanup.php
public static function addToQueue($path, $type)
    {
        if ($type != self::TYPE_DIR && $type != self::TYPE_FILE) {
            throw new \Exception(sprintf('Invalid $type parameter "%s"', $type));
        }

        self::$cleanupQueue[] = ['path' => $path, 'type' => $type];
    }
public static function addToQueue($path, $type)
    {
        if ($type != self::TYPE_DIR && $type != self::TYPE_FILE) {
            throw new \Exception(sprintf('Invalid $type parameter "%s"', $type));
        }

        self::$cleanupQueue[] = ['path' => $path, 'type' => $type];
    }
public static function addToQueue ( $ path , $ type ) { if ( $ type != self :: TYPE_DIR && $ type != self :: TYPE_FILE ) { throw new \ Exception ( sprintf ( 'Invalid $type parameter "%s"' , $ type ) ) ; } self :: $ cleanupQueue [ ] = [ 'path' => $ path , 'type' => $ type ] ; }
Add a file or a folder to the cleanup queue.

@param string $path Path that should be removed.
@param string $type Is it a file or a directory.

@throws \Exception
Add a file or a folder to the cleanup queue .