public AppendTo ( string relativePath ) : string | ||
relativePath | string | |
return | string |
public static string GetDriveName(string fullPath) { var validator = new Validator(fullPath); var drive = new DriveParser(fullPath, validator); validator.ThrowOnError(); return drive.AppendTo(string.Empty); }
private void InternalBuildForRootedFile() { var drive = new DriveParser(_fullPath, _validator); if (_validator.HasError) return; var filename = new FilenameParser(drive.PathWithoutDrive, _validator); if (_validator.HasError) return; var folders = FoldersParser.WithDriveAndFilename(filename.PathWithoutFilename, _validator); if (_validator.HasError) return; _canonical = drive.AppendTo(filename.AppendTo(folders.Canonified)); ValidateCanonicalPathLength(); }
private void InternalBuildForDrive() { var validator = new Validator(_fullPath); var drive = new DriveParser(_fullPath, validator); _canonical = drive.AppendTo(string.Empty); _validator.Ensure<InvalidPathException>(!validator.HasError, "The drive name '{0}' is not valid."); _validator.Ensure<InvalidPathException>(_canonical == _fullPath, "The drive name '{0}' is not valid."); }