/** * Returns whether the given file name is valid * @param string $file file name to check * @return bool true if the file name is valid, false otherwise * @deprecated 8.1.0 use \OC\Files\View::verifyPath() * @since 7.0.0 */ public static function isValidFileName($file) { return \OC_Util::isValidFileName($file); }
/** * @dataProvider filenameValidationProvider */ public function testFilenameValidation($file, $valid) { // private API $this->assertEquals($valid, \OC_Util::isValidFileName($file)); // public API $this->assertEquals($valid, \OCP\Util::isValidFileName($file)); }