format('Y-m-d\TH:i:s.u\Z'); return false; } public static function getNewFileName($view, $path, $prepend = ' '){ $fileNum = 1; while ($view->file_exists($path)){ $fileNum += 1; $path = preg_replace('/(\.|' . $prepend . '\(\d+\)\.)([^.]*)$/', $prepend . '(' . $fileNum . ').$2', $path); }; return $path; } }