Documentation
¶
Overview ¶
Package recent keeps the app's list of recently opened documents.
The list lives in recent.json in the app's config directory (service/paths: Config(app ID)), newest first, at most Max entries. On macOS each Add is also reported to NSDocumentController, so the Dock menu's recent items follow it (macOS lists only document types the app declares in its Info.plist).
Pair it with App.OnOpenFiles to record what the OS asks the app to open:
app.OnOpenFiles(func(paths []string) {
for _, p := range paths {
open(p)
recent.Add(app, p)
}
})
Index ¶
Constants ¶
const Max = 10
Max is how many entries the list keeps.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add puts path at the top of the list (made absolute; a repeat moves up). Safe from any goroutine.
Types ¶
This section is empty.