Skip to content
← Back to Community
Saving Repls
Profile icon
gvnostler

Does anyone know have to like do a storage system and have it save if you stop the code?

Answered by hyperupcall [earned 5 cycles]
View Answer
Voters
Profile icon
JaleahHarris
Profile icon
MarioEssam
Profile icon
gvnostler
Comments
hotnewtop
Profile icon
hyperupcall

hi!

not sure exactly what you mean, but there is an option to download your code

its hidden under the menu (you have to click on the 'three dots')
image

any code that you write will automatically be saved once you stop tying. any data that is saved will be persistent once you close the tab (meaning you will be able to see it once you visit back to the repl)

right now, no apis exist that relate to saving file. so if you were hoping to execute some javascript function when a file saved, there isnt an official and easy way to do so.

on the other hand, if you have some code that automatically writes to a file, that file will now be saved in the repl (it was recently implemented)

not sure what else you could mean, do you have any other details? :)

Profile icon
gvnostler

Thanks! Answer I needed: "on the other hand, if you have some code that automatically writes to a file, [that file will now be saved in the repl] (https://repl.it/talk/share/Realtime-file-updates/17900) (it was recently implemented)" @eankeen

Profile icon
mwilki7

You want to know if repl does that or you want to know how to do that on your own machine?

Profile icon
gvnostler

I want to know if repl can. @mwilki7

Profile icon
gvnostler

Its crucial to my project. @gvnostler

Profile icon
mwilki7

@gvnostler
Yeah repl automatically saves
You can see this at the top of the coding window saved

image

Profile icon
gvnostler

No i mean like if you wanted a to save a txt file when its being added to. @mwilki7

Profile icon
mwilki7

@gvnostler
Is this text file on your local machine or on repl?

Profile icon
gvnostler

repl. How would I do it by machine? @mwilki7

Profile icon
mwilki7

@gvnostler
Anything you edit on repl, even text files, will be automatically saved on repl.
If you wanted to do it on your machine you'd probably have to find program that supports auto saving.

Profile icon
gvnostler

If it was by code, would it save? I was testing on having it write it and it worked, but when I stopped it asked me if you want to revert back like it normally does. @mwilki7