since the IsFilePath() function just checked the absolute paths #278, I've added IsUnixFilePath() & IsWinFilePath() functions for checking both absolutes and relative file paths in Unix and Windows.
Example:
isUnixFilePath("relative_file_path") => trueisUnixFilePath("./relative_file_path") => trueisUnixFilePath("../relative_file_path") => true
IsUnixFilePath() & IsWinFilePath() functions are using UnixARPath & WinARPath regex in patterns.go
there are TestIsWinFilePath() & TestIsWinFilePath() test functions in validator_test.go for to demonstrate more
Description
since the IsFilePath() function just checked the absolute paths #278, I've added IsUnixFilePath() & IsWinFilePath() functions for checking both absolutes and relative file paths in Unix and Windows.
Example:
isUnixFilePath("relative_file_path") => true
isUnixFilePath("./relative_file_path") => true
isUnixFilePath("../relative_file_path") => true
isWinFilePath("relative_file_path") => true
isWinFilePath("..\relative_file_path") => true
isWinFilePath("..\\relative_file_path") => false
IsUnixFilePath() & IsWinFilePath() functions are using UnixARPath & WinARPath regex in patterns.go there are TestIsWinFilePath() & TestIsWinFilePath() test functions in validator_test.go for to demonstrate more