Skip to content
Preptima
hardDesignCase StudyMidSeniorStaff

A file changes on one laptop and must appear on three others, one of which is offline. What travels over the network, and what happens when two of them edited it?

In file sync, the file itself does not travel. Changed content-hashed chunks go to a block store, then a small metadata commit names the version it replaced. Other laptops pull the new manifest and the chunks they lack. A concurrent edit fails that commit and becomes a conflicted copy, never a silent overwrite.

6 min readUpdated 2026-10-09

Answer

Short answer

The file itself does not travel. Good file sync breaks each file into content-hashed chunks and uploads only the chunks the server lacks. It then commits a small metadata record listing the chunk hashes and naming the version it replaced. The other laptops learn a new version exists, fetch the manifest, and download only the chunks they are missing. If two laptops edited from the same base, the second commit is refused and its edit is kept as a conflicted copy rather than thrown away.

This page is about file sync mechanics. For reading what the interviewer wants from a deliberately vague "let users share files" brief, see the interviewer psychology guide.

Was this answer helpful?

Likely follow-ups

  • Your laptops sync peer-to-peer on the same office network with no server in the loop. What replaces the server's version number, and what does that cost?
  • Deduplication is global across all accounts. What can a client that knows only a chunk's hash now do that it should not?
  • One laptop deleted the folder while the offline one edited a file inside it. What should each of the four machines end up with?
  • A user saves a 40 GB virtual machine image every few minutes. Which part of your design struggles first?

Related questions