func (p *adiumImporter) findDir() (string, bool) { if fi, err := os.Stat(config.WithHome(filepath.Join(adiumConfigDir, adiumAccountMappingsFile))); err == nil && !fi.IsDir() { return config.WithHome(adiumConfigDir), true } return "", false }
func (x *xmppClientImporter) findFiles() []string { var res []string res = ifExists(res, config.WithHome(".xmpp-client")) res = ifExists(res, config.WithHome("Persistent/.xmpp-client")) res = ifExistsDir(res, config.WithHome(".xmpp-client")) res = ifExistsDir(res, config.WithHome(".xmpp-clients")) return res }
func (p *pidginImporter) findDir() (string, bool) { if fi, err := os.Stat(config.WithHome(filepath.Join(pidginConfigDir, pidginAccountsFile))); err == nil && !fi.IsDir() { return config.WithHome(pidginConfigDir), true } if config.IsWindows() { app := filepath.Join(config.SystemConfigDir(), pidginConfigDir) if fi, err := os.Stat(filepath.Join(app, pidginAccountsFile)); err == nil && !fi.IsDir() { return app, true } } return "", false }