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

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

Tries to set the last modified date of the given file to the last modified date of the remote document.
public static SetLastModifiedDate ( IDocument remoteDocument, string filepath, string[]>.Dictionary metadata ) : void
remoteDocument IDocument /// Remote document. ///
filepath string /// Filepath. ///
metadata string[]>.Dictionary /// Metadata of the remote file. ///
Результат void
        public static void SetLastModifiedDate(IDocument remoteDocument, string filepath, Dictionary<string, string[]> metadata)
        {
            try
            {
                if (remoteDocument.LastModificationDate != null)
                {
                    File.SetLastWriteTimeUtc(filepath, (DateTime)remoteDocument.LastModificationDate);
                }
                else
                {
                    string[] cmisModDate;
                    if (metadata.TryGetValue("cmis:lastModificationDate", out cmisModDate) && cmisModDate.Length == 3)
                    {
                        DateTime modDate = DateTime.Parse(cmisModDate[2]);
                        File.SetLastWriteTimeUtc(filepath, modDate);
                    }
                }
            }
            catch (Exception e)
            {
                Logger.Debug(string.Format("Failed to set last modified date for the local file: {0}", filepath), e);
            }
        }

Same methods

CmisUtils::SetLastModifiedDate ( IFolder remoteFolder, string folderpath, string[]>.Dictionary metadata ) : void