CodeFile.FromFile Method
Assembly: Topten.Cminor.Compiler.dll
Namespace: Topten.Cminor.Lexical
Declaring Type: CodeFile
Overloads
FromFile(string) | Constructs a CodeFile from a file |
FromFile(string, string) | Constructs a CodeFile for a file, resolving the full path from a base directory. |
FromFile(string)
Constructs a CodeFile from a file
public static CodeFile FromFile(string filename);
Parameters
string filename | The name of the file to read |
Returns
CodeFile | A StringSource for the specified file |
FromFile(string, string)
Constructs a CodeFile for a file, resolving the full path from a base directory.
public static CodeFile FromFile(string baseDirectory, string filename);
Parameters
string baseDirectory | The base directory |
string filename | The file name, which if not fully qualified will be resolved to the base directory |
Returns
CodeFile | A StringSource for the specified file |