GetFullPath() public method

public GetFullPath ( string file ) : string
file string
return string
コード例 #1
0
 public void setCWD(string cd)
 {
     if (cd != null)
     {
         cwd = FileSystem.GetFullPath(cd);
     }
 }
コード例 #2
0
        /// <summary>
        /// Main entry to the analyzer
        /// </summary>
        public void Analyze(string path)
        {
            string upath = FileSystem.GetFullPath(path);

            projectDir = FileSystem.DirectoryExists(upath) ? upath : FileSystem.GetDirectoryName(upath);
            LoadFileRecursive(upath);
        }
コード例 #3
0
        public DataType LoadFile(string path)
        {
            path = FileSystem.GetFullPath(path);

            if (!FileSystem.FileExists(path))
            {
                return(null);
            }

            ModuleType module = GetCachedModule(path);

            if (module != null)
            {
                return(module);
            }

            // detect circular import
            if (inImportStack(path))
            {
                return(null);
            }

            // set new CWD and save the old one on stack
            string oldcwd = cwd;

            setCWD(FileSystem.GetDirectoryName(path));

            pushImportStack(path);
            DataType type = parseAndResolve(path);

            popImportStack(path);

            // restore old CWD
            setCWD(oldcwd);
            return(type);
        }
コード例 #4
0
 public void addPath(string p)
 {
     path.Add(FileSystem.GetFullPath(p));
 }