Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Gets whether the specified path is a valid absolute file path.
- /// </summary>
- /// <param name="path">Any path. OK if null or empty.</param>
- static public bool IsValidPath(string path) {
- Regex r = new Regex(@"^(([a-zA-Z]\:)|(\\))(\\{1}|((\\{1})[^\\]([^/:*?<>""|]*))+)$");
- return r.IsMatch(path);
- }
Advertisement
Add Comment
Please, Sign In to add comment