You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support picking and reading local music folders on the web #26
core.Scope.PickDirectories is not supported by the web backend. In internal/platform/web/web.go, driver.ItemPickDirectories currently returns driver.NoDirectoryPicker, so apps that rely on folder selection appear unresponsive in the browser. This prevents local music apps such as WoodWind from adding a music library when run with nsgo dev -target web.
Request
Please add web support for selecting a directory (for example, using window.showDirectoryPicker() with an <input type="file" webkitdirectory> fallback where appropriate) and expose the selected files through an API that works without native filesystem paths.
The existing roadmap already calls out folder picking on the web and the need for a directory abstraction that can open its contents. Supporting this would let apps browse local folders while respecting browser permission and security constraints.
Done in 97feb42. PickDirectories now works on the web, and on iOS and Android too.
A picked Directory is now an fs.FS (Open, ReadDir, Stat), so a music library can be scanned with fs.WalkDir(dir, ".", ...) without a native path:
Web: showDirectoryPicker where the browser has it (Chromium), reading entries and files on demand; elsewhere <input webkitdirectory>, which lists the folder whole (folders holding no files are left out). One folder per pick.
Android: ACTION_OPEN_DOCUMENT_TREE; the runtime lists the tree and reads its documents for the Go process. One folder per pick.
iOS: UIDocumentPickerViewController for folders, kept in its security scope while the app runs, read by Path.
Desktops: unchanged, read by Path.
Opened files are io.Seekers on every target, so tag readers can jump to the end of a file. On Android and the web each read waits for the platform, so read folders off the engine's goroutine (in a goroutine, posting results back with Scope.Post), as the gallery's System demo does.
Activity
oneo-me commentedon Nov 8, 2026
Done in 97feb42.
PickDirectoriesnow works on the web, and on iOS and Android too.A picked
Directoryis now anfs.FS(Open,ReadDir,Stat), so a music library can be scanned withfs.WalkDir(dir, ".", ...)without a native path:showDirectoryPickerwhere the browser has it (Chromium), reading entries and files on demand; elsewhere<input webkitdirectory>, which lists the folder whole (folders holding no files are left out). One folder per pick.ACTION_OPEN_DOCUMENT_TREE; the runtime lists the tree and reads its documents for the Go process. One folder per pick.UIDocumentPickerViewControllerfor folders, kept in its security scope while the app runs, read byPath.Path.Opened files are
io.Seekers on every target, so tag readers can jump to the end of a file. On Android and the web each read waits for the platform, so read folders off the engine's goroutine (in a goroutine, posting results back withScope.Post), as the gallery's System demo does.