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

Unix.stat on autoloaded files #650

Closed
cpitclaudel opened this issue Mar 21, 2018 · 4 comments
Closed

Unix.stat on autoloaded files #650

cpitclaudel opened this issue Mar 21, 2018 · 4 comments

Comments

@cpitclaudel
Copy link
Contributor

Hi there,

I'm trying to use the register_autoload function to load data files lazily. One problem is that my code needs to compare modifications time, and although caml_fs_register seems to be able to register MlFiles, I wasn't able to find a similar feature for autoloads.

Is there an easy way for my javascript code to dynamically intercept file system calls an return an MlFile, rather than a string?

Thanks!

@cpitclaudel
Copy link
Contributor Author

caml_fs_register seems to be able to register MlFiles

Hm :/ This seems to have been true for caml_fs_register in 2.8.4 (the version that I was using), but not anymore. And the caml_unix_time function seems to be gone, too.

Is there a workaround for this?

@hhugo
Copy link
Member

hhugo commented Sep 22, 2021

@cpitclaudel, I completely missed that issue. Is this still an issue for you ?

@cpitclaudel
Copy link
Contributor Author

I imagine I found a workaround at the time, but I forget what I ended up doing.

@hhugo
Copy link
Member

hhugo commented Sep 23, 2021

#1115 adds support for Unix.stat for node filesystem. With a bit of work it could be implemented for the in memory filesystem

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

2 participants