public string LocalToRemote(string localPath)
{
if (string.IsNullOrEmpty(localPath))
{
return localPath;
}
string path = localPath;
// Revert back from two-bytes representation. Backward slashes have no special meaning on the CMIS side.
path = path.Replace('¥', '\\');
// Windows backward slashe to CMIS slash.
path = path.Replace('\\', '/'); // Convert Windows file separator to CMIS file separator.
// Other characters
//path = path.Replace('<', '<'); // Revert back from two-bytes representation.
//path = path.Replace('>', '>');
//path = path.Replace(':', ':');
//path = path.Replace('*', '*');
//path = path.Replace('?', '?');
//path = path.Replace('|', '|');
// Only for tests on ECMs that have the same character restrictions as Windows, such as Alfresco.
//path = path.Replace('&', '&');
return path;
}
}