public ParsePathInfo ParsePath(string FullPath)
{
//FullPath = FullPath.Replace('\\', '/');
//Console.Error.WriteLine("FullPath: {0}", FullPath);
if (FullPath.IndexOf(':') == -1)
{
FullPath = CurrentDirectoryPath + "/" + FullPath;
}
//Console.Error.WriteLine("FullPath: {0}", FullPath);
var Match = new Regex(@"^([a-zA-Z]+)(\d*):(.*)$").Match(FullPath);
var DriverName = Match.Groups[1].Value.ToLower() + ":";
int FileSystemNumber = 0;
IHleIoDriver HleIoDriver = null;
Int32.TryParse(Match.Groups[2].Value, out FileSystemNumber);
if (!Drivers.TryGetValue(DriverName, out HleIoDriver))
{
foreach (var Driver in Drivers)
{
Console.WriteLine("Available Driver: '{0}'", Driver.Key);
}
throw(new KeyNotFoundException("Can't find HleIoDriver '" + DriverName + "'"));
}
return new ParsePathInfo()
{
HleIoDrvFileArg = new HleIoDrvFileArg(DriverName, HleIoDriver, FileSystemNumber, null),
LocalPath = Match.Groups[3].Value.Replace('\\', '/'),
};
}