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

GetFile() public method

Get the content for the client brand file
public GetFile ( string pathname, Stream output ) : bool
pathname string Client brand file path
output Stream Stream to hold the client brand file
return bool
        public bool GetFile(string pathname, Stream output) {
            if (this.session == null) {
                return false;
            }

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

                DotCMIS.Data.IContentStream contentStream = doc.GetContentStream();
                if (contentStream == null) {
                    return false;
                }

                contentStream.Stream.CopyTo(output);
                return true;
            } catch (Exception e) {
                Logger.Debug(e.Message);
                return false;
            }
        }