コード例 #1
0
ファイル: install.go プロジェクト: Varjelus/keybase-client
// 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))
}
コード例 #2
0
ファイル: keybase.go プロジェクト: qbit/client
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,
	}
}