Asgard.ScriptSystem.PathHelpers.Resolve C# (CSharp) Метод

Resolve() публичный статический Метод

public static Resolve ( string file ) : string
file string
Результат string
        public static string Resolve(string file)
        {
            if (file.StartsWith(_basePath))
            {
                var fullFile = Path.GetFullPath(file);
                if (fullFile.StartsWith(_basePath))
                {
                    if (File.Exists(fullFile))
                    {
                        return fullFile;
                    }
                }
            }

            var newFile = Path.GetFullPath(Path.Combine(_basePath, file));
            if (newFile.StartsWith(_basePath))
            {
                return newFile;
            }

            return "";
        }