CmisSync.WindowsPathRepresentationConverter.LocalToRemote C# (CSharp) Метод

LocalToRemote() публичный Метод

Convert a path from Windows to CMIS.
public LocalToRemote ( string localPath ) : string
localPath string
Результат string
        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;
        }
    }
WindowsPathRepresentationConverter