(localPath string)
| 216 | } |
| 217 | |
| 218 | func getLocalDirsAndFiles(localPath string) ([]string, []string, error) { |
| 219 | var files, dirs []string |
| 220 | entries, err := os.ReadDir(localPath) |
| 221 | if err != nil { |
| 222 | return nil, nil, err |
| 223 | } |
| 224 | for _, entry := range entries { |
| 225 | fullPath := stdpath.Join(localPath, entry.Name()) |
| 226 | if entry.IsDir() { |
| 227 | dirs = append(dirs, fullPath) |
| 228 | } else { |
| 229 | files = append(files, fullPath) |
| 230 | } |
| 231 | } |
| 232 | return files, dirs, nil |
| 233 | } |
| 234 | |
| 235 | func init() { |
| 236 | op.RegisterObjsUpdateHook(UpdateLocalStrm) |
no test coverage detected