public static function removeRows($filepath, array $rowIndexes, $delimiter=",", $enclosure='"')
    {
        $tmpFile = tmpfile();
        $fileHandle = fopen($filepath, "r");
        $lineNumber = 1;
        
        if ($fileHandle)
        {
            while (!feof($fileHandle))
            {
                $lineArray = fgetcsv($fileHandle, 0, $delimiter, $enclosure);
                
                if ($lineArray)
                {
                    if (!in_array($lineNumber, $rowIndexes))
                    {
                        fputcsv($tmpFile, $lineArray, $delimiter, $enclosure);
                    }
                }
                
                $lineNumber++;
            }
            
            fclose($fileHandle);
            $meta_data = stream_get_meta_data($tmpFile);
            $tmpFileName = $meta_data["uri"];
            rename($tmpFileName, $filepath); # replace the old upload file with new.
        }
        else
        {
            throw new \Exception("removeRows: Failed to open CSV file for trimming.");
        }
    }