CmisSync.Lib.Cmis.CmisUtils.GetLocalPaths C# (CSharp) Метод

GetLocalPaths() публичный статический Метод

public static GetLocalPaths ( IDocument remoteDococument, string remoteTargetFolder, string localTargetFolder ) : List
remoteDococument IDocument
remoteTargetFolder string
localTargetFolder string
Результат List
        public static List<string> GetLocalPaths(IDocument remoteDococument, string remoteTargetFolder, string localTargetFolder) {
            List<string> results = new List<string>();
            foreach (string remotePath in remoteDococument.Paths) {
                if(remotePath.Length <= remoteTargetFolder.Length) {
                    continue;
                }

                string relativePath = remotePath.Substring(remoteTargetFolder.Length);
                if (relativePath[0] == '/') {
                    relativePath = relativePath.Substring(1);
                }

                string localPath = Path.Combine(remoteTargetFolder, relativePath).Replace('/', Path.DirectorySeparatorChar);
                results.Add(localPath);
            }

            return results;
        }
    }