Remix.run Logo
▲ Ulkopuolinen 21 hours ago

You edit a file in a text editor. You save the file. You close the text editor. You cut power.

The file is lost because it was not written to the disk.

How is this a sign that the text editor is not worth using?

▲cachvico 14 hours ago | parent | next [-]

That's got nothing to do with cached data or corruption.

▲Ulkopuolinen 7 hours ago | parent [-]

File not being stored to disk after the application saves it has everything to do with cached data. It's exactly what this thread is about.

▲SoftTalker 4 hours ago | parent [-]

Application should call sync() or equivalent and get a positive result before reporting to the user that the file was saved. If the OS hasn't actually written the bits to disk yet, or the disk controller has cached them but not written them, not much the application can do.

But all of that is beside the point. What I said was that the application should do something sane if the cached data is missing or corrupt. Not that it should never lose data; that's impossible for any app to guarantee.

▲cowlevel 3 hours ago | parent | prev [-]

They did say cached data