UnitTest/src/ErrorFile.cs
/// <summary>
/// Gets a map with the directory of each file
/// </summary>
/// <param name="fileName">FileInfo with path information or a directory.</param>
/// <param name="directories">A filename : directoryname map</param>
Gets a map with the directory of each file
Gets a map with the directory of each file
private static void GetDirectories(FileInfo f, IDictionary<string, string> directories) {
            if (Directory.Exists(f.FullName)) {
                string[] files = Directory.GetFileSystemEntries(f.FullName);
                for (int i = 0; i < files.Length; i++) {
                    GetDirectories(new FileInfo(files[i]), directories);
                    directories[files[i]] = f.FullName;
                }
            }
            if ((f.Name.Length > 3) && f.Name.Substring(f.Name.Length - 3).Equals(".cs"))
                directories[f.Name] = f.Directory.FullName;
            else if((f.Name.Length > 7) && f.Name.Substring(f.Name.Length - 7).Equals(".stadyn"))
                directories[f.Name] = f.Directory.FullName;
        }
private static void GetDirectories ( FileInfo f , IDictionary < string , string > directories ) { if ( Directory . Exists ( f . FullName ) ) { string [ ] files = Directory . GetFileSystemEntries ( f . FullName ) ; for ( int i = 0 ; i < files . Length ; i ++ ) { GetDirectories ( new FileInfo ( files [ i ] ) , directories ) ; directories [ files [ i ] ] = f . FullName ; } } if ( ( f . Name . Length > 3 ) && f . Name . Substring ( f . Name . Length - 3 ) . Equals ( " " ) ) directories [ f . Name ] = f . Directory . FullName ; else if ( ( f . Name . Length > 7 ) && f . Name . Substring ( f . Name . Length - 7 ) . Equals ( " " ) ) directories [ f . Name ] = f . Directory . FullName ; }
Gets a map with the directory of each file
Gets a map with the directory of each file
f
FileInfo
directories
IDictionary<string, string>
A filename : directoryname map
A filename : directoryname map
fileName
FileInfo with path information or a directory.
FileInfo with path information or a directory .