diff --git a/lib/private/util.php b/lib/private/util.php
index 4c60af881895714c47236edc1b0fecaea5ef7a60..0e5d08e180e221eecc0685bd1de0a6645cc57cd9 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1416,6 +1416,7 @@ class OC_Util {
 	 *
 	 * @param string $file file name to check
 	 * @return bool true if the file name is valid, false otherwise
+	 * @deprecated use \OC\Files\View::verifyPath()
 	 */
 	public static function isValidFileName($file) {
 		$trimmed = trim($file);
diff --git a/lib/public/util.php b/lib/public/util.php
index e6e14a26e01e08bbdbcd15a81f6d9b2060ee4d05..aa6cd5ba012316ec94c8357d1f9add6ff0bce8cc 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -497,6 +497,7 @@ class Util {
 	 * 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 use \OC\Files\View::verifyPath()
 	 */
 	public static function isValidFileName($file) {
 		return \OC_Util::isValidFileName($file);