Esempio n. 1
0
// We're only moving the folder in case something somehow managed to get at it
// in between unmounting and checking if it had files.
func trashDir(context Context, dir string) error {
	randString, err := libkb.RandString("Trash.", 20)
	if err != nil {
		return err
	}
	return os.Rename(dir, filepath.Join(context.GetCacheDir(), randString))
}
Esempio n. 2
0
func NewKeybaseUpdateSource(log logger.Logger, api libkb.API, runMode libkb.RunMode, defaultChannel string) KeybaseUpdateSource {
	legacyID, _ := libkb.RandString("", 20)
	return KeybaseUpdateSource{
		log:            log,
		api:            api,
		runMode:        runMode,
		defaultChannel: defaultChannel,
		legacyID:       legacyID,
	}
}