CmisSync.Lib.ClientBrandBase.GetFileDateTime C# (CSharp) Method

GetFileDateTime() public method

Get the DateTime for the client brand file
public GetFileDateTime ( string pathname, System.DateTime &date ) : bool
pathname string Client brand file path
date System.DateTime The DateTime for the client brand file
return bool
        public bool GetFileDateTime(string pathname, out DateTime date) {
            date = DateTime.Now;

            if (this.session == null) {
                return false;
            }

            try {
                IDocument doc = this.session.GetObjectByPath(pathname) as IDocument;
                if (doc == null || doc.LastModificationDate == null) {
                    return false;
                }

                date = doc.LastModificationDate.GetValueOrDefault();
                return true;
            } catch (Exception e) {
                Logger.Debug(e.Message);
                return false;
            }
        }