Everything your app keeps, a photo, a document, a user's row, is stored as one of these.

A file is a named box of bytes kept in storage, so it's still there after the power goes off.

Wikipedia: "A computer file is a named collection of data treated as a unit by the system that manages it." Two words matter: named (so it can be found again) and collection of data (so it's really just a pile of numbers).

Everything inside a file is bytes, plain numbers. What makes one file a photo and another a paragraph is its type (the .jpg or .txt), which tells the computer how to read those numbers. Same bytes, wrong type, and it comes out as nonsense.

Files live in storage, which keeps them, not in RAM, which forgets. That's the split from the last two lessons: RAM is the desk that's cleared each night; a file is put away in the cabinet and is still there tomorrow.

Your app's data is files too. An uploaded photo is a file (we keep this site's images as files in cloud storage), and even database rows are, underneath, files the database looks after. Which is exactly why backups matter: lose the files, lose the data.

Try it with the rules off. Try this for real and harmless: copy a photo, rename the copy from .jpg to .txt, and open it. The bytes didn't change, but the computer now reads them the wrong way and shows gibberish. Rename it back and it's a photo again.

Check yourself

0/4 got it

Saved on this device only. No account, no streaks.