Skip to content

Commit e25e95b

Browse files
committed
chore: update README.md.
1 parent 9d7adbd commit e25e95b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

plugins/recent-doc/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,20 @@ fn main() {
5959
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
6060

6161
```javascript
62+
import {
63+
addRecentDocument,
64+
clearRecentDocuments,
65+
getRecentDocument
66+
} from '@tauri-apps/plugin-recent-doc'
6267

68+
// Add a file to the OS recent documents list
69+
await addRecentDocument('/path/to/your/document.txt')
70+
71+
// Get the recent documents list
72+
const recentDocs = await getRecentDocument()
73+
74+
// Clear all recent documents from the OS list
75+
await clearRecentDocuments()
6376
```
6477

6578
## Contributing

0 commit comments

Comments
 (0)