Exemplo n.º 1
0
        private void SetReadOnly(SmbFile file, bool isReadOnly)
        {
            var isCurrentlyReadOnly = !file.CanWrite();

            if (isCurrentlyReadOnly && !isReadOnly)
            {
                file.SetReadWrite();
            }
            else if (!isCurrentlyReadOnly && isReadOnly)
            {
                file.SetReadOnly();
            }
        }