INNER CODE UNIT · Go

save

cgzirim/seek-tune · server/cmdHandlers.go:255

func save(path string, force bool) {
	fileInfo, err := os.Stat(path)
	if err != nil {
		fmt.Printf("Error stating path %v: %v\n", path, err)
		return
	}

	if fileInfo.IsDir() {
		var filePaths []string
		err := filepath.Walk(path, func(filePath string, info os.FileInfo, err error) error {
			if err != nil {
				fmt.Printf("Error walking the path %v: %v\n", filePath, err)
				return err
			}
			// Process only files, skip directories
			if !info.IsDir() {
				filePaths = append(filePaths, filePath)
			}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…