AssemblyCSharp.LoaderUtil.TextFileExists C# (CSharp) Method

TextFileExists() public static method

public static TextFileExists ( string path ) : bool
path string
return bool
        public static bool TextFileExists(string path)
        {
            if (path.StartsWith("Assets/Resources/"))
            {
            var pattern = @"(Assets/Resources/)([^.]*)(\..*)";
            path = Regex.Replace(path, pattern, "$2");
            return Resources.Load(path) as TextAsset != null;
            }
            else
            {
            return File.Exists(path);
            }
        }