// Set/clear file bits - only executable for now
511753
func (c SimpleFSClient) SimpleFSSetStat(ctx context.Context, __arg SimpleFSSetStatArg) (err error) {
	err = c.Cli.Call(ctx, "keybase.1.SimpleFS.simpleFSSetStat", []interface{}{__arg}, nil)
	return
}
832720
func (pset *Permset) ClearPerms() error {
	rv, _ := C.acl_clear_perms(pset.p)
	if rv < 0 {
		return fmt.Errorf("unable to clear perms")
	}
	return nil
}
954501
func clearReadOnly(f *os.File) error {
	bi, err := winio.GetFileBasicInfo(f)
	if err != nil {
		return err
	}
	if bi.FileAttributes&syscall.FILE_ATTRIBUTE_READONLY == 0 {
		return nil
	}
	sbi := winio.FileBasicInfo{
		FileAttributes: bi.FileAttributes &^ syscall.FILE_ATTRIBUTE_READONLY,
	}
	if sbi.FileAttributes == 0 {
		sbi.FileAttributes = syscall.FILE_ATTRIBUTE_NORMAL
	}
	return winio.SetFileBasicInfo(f, &sbi)
}
1111010
func Clear() (err error) {
	if localStorage == nil || localStorage == js.Undefined {
		return ErrLocalStorageNotSupported
	}
	defer func() {
		if r := recover(); r != nil {
			var ok bool
			err, ok = r.(error)
			if !ok {
				err = fmt.Errorf("could not use local storage: %v", r)
			}
		}
	}()

	localStorage.Call("clear")
	return nil
}
924117
func (f *Flash) Clear() {
	if f.Count() > 0 {
		f.changed = true
	}
	f.v = nil
}
328191
func (ba *bitArray) ClearBit(k uint64) error {
	if k >= ba.Capacity() {
		return OutOfRangeError(k)
	}

	if !ba.anyset { // nothing is set, might as well bail
		return nil
	}

	i, pos := getIndexAndRemainder(k)
	ba.blocks[i] &^= block(1 << pos)

	if k == ba.highest {
		ba.setHighest()
	} else if k == ba.lowest {
		ba.setLowest()
	}
	return nil
}
662246
func (ac *AddressCache) Clear(addrs []string) (numCleared int) {
	if addrs == nil {
		return ac.ClearAll()
	}
	if len(addrs) == 0 {
		return
	}
	ac.mtx.Lock()
	defer ac.mtx.Unlock()
	for i := range addrs {
		delete(ac.a, addrs[i])
		numCleared++
	}
	return
}
181999
func (f *File) SetEndOfFile(ctx context.Context, fi *dokan.FileInfo, length int64) (err error) {
	f.folder.fs.logEnter(ctx, "File SetEndOfFile")
	defer func() { f.folder.reportErr(ctx, libkbfs.WriteMode, err) }()

	return f.folder.fs.config.KBFSOps().Truncate(ctx, f.node, uint64(length))
}
1048960
func yaml_emitter_set_output_file(emitter *yaml_emitter_t, file io.Writer) {
	if emitter.write_handler != nil {
		panic("must set the output target only once")
	}
	emitter.write_handler = yaml_file_write_handler
	emitter.output_file = file
}
891230
func bitsetDecodeBytes(data []byte, target int) ([]byte, error) {
	out, size, err := bitsetDecodePartialBytes(data, target)
	if err != nil {
		return nil, err
	}
	if size != len(data) {
		return nil, errUnreferencedData
	}
	return out, nil
}
20865
func (sba *sparseBitArray) SetBit(k uint64) error {
	index, position := getIndexAndRemainder(k)
	i, inserted := sba.indices.insert(index)

	if inserted {
		sba.blocks.insert(i)
	}
	sba.blocks[i] = sba.blocks[i].insert(position)
	return nil
}
584470
func UpdateFileMode(fm *os.FileMode, b PermissionBits) {
	// Setuid, Setgid, and Sticky bits are not in the same position in the two bitmaks
	// So we need to set their values manually
	if b.Setuid() {
		*fm |= os.ModeSetuid
	} else {
		*fm &^= os.ModeSetuid
	}
	if b.Setgid() {
		*fm |= os.ModeSetgid
	} else {
		*fm &^= os.ModeSetgid
	}
	if b.Sticky() {
		*fm |= os.ModeSticky
	} else {
		*fm &^= os.ModeSticky
	}

	// unset bit-values that don't map to the same position in FileMode
	b.SetSetgid(false)
	b.SetSetuid(false)
	b.SetSticky(false)

	// Clear the permission bitss
	*fm &^= 0777

	// Set the permission bits
	*fm |= os.FileMode(b)
}
1058981
func Clear(ctx context.Context, checksum string, force bool) error {
	if clipboard.Unsupported {
		return ErrNotSupported
	}

	cur, err := clipboard.ReadAll()
	if err != nil {
		return errors.Wrapf(err, "failed to read clipboard: %s", err)
	}

	hash := fmt.Sprintf("%x", sha256.Sum256([]byte(cur)))
	if hash != checksum && !force {
		return nil
	}

	if err := clipboard.WriteAll(""); err != nil {
		_ = notify.Notify(ctx, "gopass - clipboard", "Failed to clear clipboard")
		return errors.Wrapf(err, "failed to write clipboard: %s", err)
	}

	if err := clearClipboardHistory(ctx); err != nil {
		_ = notify.Notify(ctx, "gopass - clipboard", "Failed to clear clipboard history")
		return errors.Wrapf(err, "failed to clear clipboard history: %s", err)
	}

	if err := notify.Notify(ctx, "gopass -clipboard", "Clipboard has been cleared"); err != nil {
		return errors.Wrapf(err, "failed to send unclip notification: %s", err)
	}

	return nil
}
1000208
func (c *downloadCommand) SetFlags(f *gnuflag.FlagSet) {
	c.CommandBase.SetFlags(f)
	f.StringVar(&c.Filename, "filename", "", "Download target")
}
101000
func (fds *FDSet) Clear(fd uintptr) {
	var i uint
	for i = 0; i < fds.fd_count; i++ {
		if fds.fd_array[i] == fd {
			for i < fds.fd_count-1 {
				fds.fd_array[i] = fds.fd_array[i+1]
				i++
			}
			fds.fd_count--
			break
		}
	}
}
918926
func (b *Buckets) setBits(offset, length, bits uint32) {
	byteIndex := offset / 8
	byteOffset := offset % 8
	if byteOffset+length > 8 {
		rem := 8 - byteOffset
		b.setBits(offset, rem, bits)
		b.setBits(offset+rem, length-rem, bits>>rem)
		return
	}
	bitMask := uint32((1 << length) - 1)
	b.data[byteIndex] = byte(uint32(b.data[byteIndex]) & ^(bitMask << byteOffset))
	b.data[byteIndex] = byte(uint32(b.data[byteIndex]) | ((bits & bitMask) << byteOffset))
}
242021
func (r *Row) clearBit(i uint64) (changed bool) { // nolint: unparam
	s := r.segment(i / ShardWidth)
	if s == nil {
		return false
	}
	return s.ClearBit(i)
}