ScrewTurn.Wiki.FilesStorageProvider.BuildFullPathForAttachments C# (CSharp) Method

BuildFullPathForAttachments() private method

Builds a full path from a provider-specific partial path.
For example: if partialPath is "/my/directory", the method returns "C:\Inetpub\wwwroot\Wiki\public\Attachments\my\directory", assuming the Wiki resides in "C:\Inetpub\wwwroot\Wiki".
private BuildFullPathForAttachments ( string partialPath ) : string
partialPath string The partial path.
return string
        private string BuildFullPathForAttachments(string partialPath)
        {
            if(partialPath == null) partialPath = "";
            partialPath = partialPath.Replace("/", Path.DirectorySeparatorChar.ToString()).TrimStart(Path.DirectorySeparatorChar);
            string up = Path.Combine(host.GetSettingValue(SettingName.PublicDirectory), AttachmentsDirectory);
            return CheckPath(Path.Combine(up, partialPath), up); // partialPath CANNOT start with "\" -> Path.Combine does not work
        }