CmisSync.Lib.Consumer.SituationSolver.AbstractEnhancedSolver.IsParentReadOnly C# (CSharp) Method

IsParentReadOnly() protected method

protected IsParentReadOnly ( IFileSystemInfo localFileSystemInfo ) : bool
localFileSystemInfo IFileSystemInfo
return bool
        protected bool IsParentReadOnly(IFileSystemInfo localFileSystemInfo) {
            var parent = this.GetParent(localFileSystemInfo);
            while (parent != null && parent.Exists) {
                string parentId = Storage.GetRemoteId(parent);
                if (parentId != null) {
                    var remoteObject = this.Session.GetObject(parentId);
                    if (remoteObject.CanCreateFolder() == false && remoteObject.CanCreateDocument() == false) {
                        return true;
                    }

                    break;
                }

                parent = this.GetParent(parent);
            }

            return false;
        }