Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Auto-updating versions of Basefunctions: @readdir, @isfile, @read, @pwd, @stat, etc. #9

Open
fonsp opened this issue Feb 25, 2022 · 1 comment

Comments

@fonsp
Copy link
Member

fonsp commented Feb 25, 2022

We could use PlutoHooks and file watching to create auto-updating versions of lots of filesystem functions from Base! https://docs.julialang.org/en/v1/base/file/#Base.Filesystem.readdir

For example: readdir(path) gives all files in a dir. @readdir(path) would return the same, but automatically re-run if something changed! This would be a super simple API for file watching!

For example, a dropdown menu of all files in a directory that automatically updates the list of options:

@bind filename Select(@readdir("exports"))
@fonsp
Copy link
Member Author

fonsp commented Feb 25, 2022

Besides filesystem functions, there might be more functions from Base that we could make "auto-watching". e.g. @download could poll the headers of a URL resource (like Etag or Created) and re-download when something changed. @length(xs) could re-run when you call push!(xs,123)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant