src/Utilities/CopyFileManager/CopyGlobFilteredFileManager.php
public static function copy($sourcePath, $destinationPath, $globExpressionList = [])
    {
        if (!is_string($sourcePath)) {
            $message = "Given value \"$sourcePath\" is not a valid source path entry. ".
                "Valid entry must be an absolute path to an existing file or directory.";

            throw new \InvalidArgumentException($message);
        }

        if (!is_string($destinationPath)) {
            $message = "Given value \"$destinationPath\" is not a valid destination path entry. ".
                "Valid entry must be an absolute path to an existing directory.";

            throw new \InvalidArgumentException($message);
        }

        if (!file_exists($sourcePath)) {
            return;
        }

        if (is_dir($sourcePath)) {
            self::copyDirectory($sourcePath, $destinationPath, $globExpressionList);
        } else {
            self::copyFile($sourcePath, $destinationPath, $globExpressionList);
        }
    }
public static function copy($sourcePath, $destinationPath, $globExpressionList = [])
    {
        if (!is_string($sourcePath)) {
            $message = "Given value \"$sourcePath\" is not a valid source path entry. ".
                "Valid entry must be an absolute path to an existing file or directory.";

            throw new \InvalidArgumentException($message);
        }

        if (!is_string($destinationPath)) {
            $message = "Given value \"$destinationPath\" is not a valid destination path entry. ".
                "Valid entry must be an absolute path to an existing directory.";

            throw new \InvalidArgumentException($message);
        }

        if (!file_exists($sourcePath)) {
            return;
        }

        if (is_dir($sourcePath)) {
            self::copyDirectory($sourcePath, $destinationPath, $globExpressionList);
        } else {
            self::copyFile($sourcePath, $destinationPath, $globExpressionList);
        }
    }
Copy files/directories from source to destination.

@param string $sourcePath         Absolute path to file or directory.
@param string $destinationPath    Absolute path to file or directory.
@param array  $globExpressionList List of glob expressions, e.g. ["*.txt", "*.pdf"].

@throws \InvalidArgumentException If given $sourcePath is not a string.
@throws \InvalidArgumentException If given $destinationPath is not a string.

@return null