Research · codebase size

How many lines of code does file sync software need?

A sync product has to handle conflicts, interrupted transfers, encryption, authentication and several operating systems. Here is how big that gets, measured two ways and dated, with the method written out.

By Foldpair team · updated November 17, 2026 · Sources and evidence

Short answer: At commit 41a38aae0 on 17 November 2026, Foldpair's core stack is 311,948 lines: about 2.2 times Nextcloud Desktop and about 1.7 times rclone. Those two competitor counts date from 29 August 2026 and were not re-counted, so read the ratios as an order of magnitude. On 29 August the same scope measured 137,879 lines, then in the same range as Nextcloud Desktop and below rclone. Code size grows with a product, so compare dated snapshots, not a single number.

Free plan ($0) for Windows, macOS and Linux, plus an Android app for one-off file transfers. No credit card to download. Clipboard contents, and folder contents when folder encryption is on (the default for folders you own on desktop), are encrypted on your device with AES-256-GCM.

Download Foldpair

Runtime code across 11 file-sync and transfer projects

Counting lines of code is a blunt way to describe software, but it answers a fair question: how much has to be built before a file-sync product works across operating systems, networks and failures? The table below is the archived 29 August 2026 snapshot, in which every project was counted on the same rules and the same date. Foldpair's current size is in the next section.

ProjectComparable runtime LOCRelative to FoldpairScope note
rcloneabout 180,0001.30×Command-line product with a very large storage-backend surface
Nextcloud Desktopabout 145,0001.05×Desktop client only; the Nextcloud server is not included
Foldpair core stack137,8791.00×Relay server, sync agent, shared core and desktop UI
Syncthing64,7920.47×Continuous peer-to-peer sync daemon and embedded web UI
LocalSendabout 62,2000.45×Cross-platform one-time local-network transfer
Seafile Desktopabout 45,3000.33×Desktop client only; the server is not included
Unisonabout 44,7000.32×Two-replica synchronization with a narrower account and UI scope
ownCloud Desktopabout 44,3000.32×Desktop client only; the server is not included
crocabout 34,4000.25×One-time relay transfer rather than continuous folder sync
Mutagenabout 29,7000.22×Developer-oriented synchronization and forwarding
Magic Wormholeabout 8,4000.06×Focused command-line transfer workflow

Foldpair re-measured on 17 November 2026

The August count is no longer the size of the codebase. We re-measured the Foldpair source at commit 41a38aae0, using the same scope: the C# and AXAML of the relay server, the sync agent, the shared core and the desktop client. Tests, translations, generated files and build output were excluded, as were the Android, iOS and website code.

Component29 Aug 2026 (counter)17 Nov 2026 (commit 41a38aae0)
Relay server40,63082,222
Sync agent26,00153,499
Shared core13,41830,460
Desktop client (C# and AXAML)57,927145,767
Core stack total137,976311,948

On the same rules the core stack is about 2.3 times its August size. Against the archived competitor counts, 311,948 lines is roughly 1.7 times rclone and 2.2 times Nextcloud Desktop. Those ratios mix dates, because the competitors were not re-counted, so treat them as an order of magnitude and not as a ranking. As a scale check, C# under the tests folder, counted with the same rules, is about 397,000 lines, so the test code is larger than the runtime code it covers.

The two measurements agree on method. The August column was produced by running the counter on the repository as it stood on 29 August 2026, and it lands within 0.1 percent of the 137,879 figure that cloc 2.11 produced then. The remaining 97-line difference comes from how the two tools treat a few edge cases, which is why we call the November figures a measurement and not an audit.

What we counted, and what we left out

The competitor figures come from cloc 2.11 run against dated source snapshots: non-blank, non-comment runtime code plus declarative UI. Tests, documentation, translations, vendored dependencies, generated files and build output were excluded. For Foldpair we also wrote a small counter that applies the same rules to C# and AXAML, checked it against the August cloc result, and used it for the November figures.

  1. Take a fixed commit and list the four project folders that are counted: the relay server (Foldpair.Server), the sync agent (Foldpair.Agent), the shared core (Foldpair.Core) and the desktop client (Foldpair.Launcher.Cross).
  2. Run python3 scripts/editorial/count-runtime-loc.py src --core; its TOTAL is the published figure. Without --core the script also counts the update helper, operator console and provider analytics projects, which are outside this scope (3,122 more lines, 315,070 in all).
  3. Count every C# and AXAML file, skipping generated files and the obj and bin folders.
  4. Within each file, drop blank lines, line comments, block comments and XML comments.
  5. Sum per project and report the commit that was measured.

This is not a productivity league table. Go, C++, C#, Dart and Python express the same behavior at different densities, and two products with the same LOC can solve very different problems. The numbers are useful for scale, not for declaring a winner.

The competitor counts are archived measurements from 29 August 2026, not the current sizes of those projects. We did not re-count them for this update, and their source snapshots are linked in the sources below. Foldpair's source repository is private, so its counts cannot be independently verified from outside; we publish the method and the measured commit so that the numbers are at least reproducible by us and checkable for internal consistency.

How to read these numbers

Of the 311,948 lines, the desktop client accounts for 145,767, about 47 percent. The relay server is 82,222 (26 percent), the sync agent 53,499 (17 percent) and the shared core 30,460 (10 percent). A large share sits in the user interface because the client is a full application with onboarding, folder management, contacts, transfer history, settings and recovery screens, not a command-line tool. Tools that ship only a daemon or a command line, such as Syncthing, Unison, Mutagen or croc, do not carry that cost.

  • Compare like with like: a desktop client without its server, as with Nextcloud, Seafile or ownCloud, is a smaller scope than a client plus relay.
  • Compare on one date: a count from August and a count from November describe different codebases.
  • Compare languages carefully: the same behavior takes more lines in some languages than in others.
  • Ask what is excluded: tests, generated files and translations can double a raw file count.

The practical conclusion is modest. File sync is not a weekend project, and the cost of a complete product grows as it gains platforms, recovery paths and account features. That is a reason to be cautious about any single line-count claim, including ours.

What the size covers

The Foldpair core stack covers an authenticated temporary relay, account and device flows, end-to-end encrypted folder and clipboard payloads, resumable uploads, share links, contacts, remote file access (not on the Free plan), billing and a native desktop interface. These counts describe codebase size and scope, not product quality.

Closed-source products such as Resilio Sync, GoodSync, Dropbox, OneDrive and Google Drive were reviewed as market competitors but omitted from the table. Their client source is not publicly verifiable, so estimating it would turn a reproducible comparison into guesswork.

What users get for that code

Small tools in the table solve valuable but narrower jobs. LocalSend, croc and Magic Wormhole focus on sending files. Foldpair keeps selected folders synchronized across different networks and adds encrypted clipboard sync, resumable transfers, conflict copies, local file history, device invitations, remote file access (not on the Free plan) and temporary share links in one application.

The architecture also differs from a permanent cloud drive. Working copies stay on participating devices, while folder and clipboard contents are encrypted on the device before transfer. The authenticated temporary relay handles ciphertext, and the encryption keys remain only on participating devices. Users do not need to expose an inbound port or keep every device on the same local network.

JobTypical small toolWhat Foldpair adds in the same app
Send one file onceLocalSend, croc, Magic WormholeThe same one-off send, plus folders that stay in sync afterwards.
Keep a folder identical on two machinesSyncthing, Unison, MutagenA relay path across networks, an account model and a desktop interface for non-technical users.
Reach files from a browserNextcloud, ownCloud, SeafileNot offered: working copies live on your devices, and the relay is not a cloud drive.

Choose the workflow, not the smallest number

A smaller codebase is not automatically safer, faster or easier to use, and a larger one is not automatically better. If you need selected folders to stay synchronized across different networks without a permanent cloud drive, download Foldpair and verify the first workflow with a small test folder. If you only need a one-time transfer on your own network, a smaller tool is the sensible choice.

  • Pick a sending tool such as LocalSend, croc or Magic Wormhole when the job is one transfer.
  • Pick a sync daemon such as Syncthing or Mutagen when you are comfortable configuring devices and connections yourself.
  • Pick Foldpair when you want an encrypted two-way folder sync with a desktop interface, across networks, with no router work.

Frequently asked questions

How many lines of code is Foldpair?

At commit 41a38aae0 on 17 November 2026, the core stack of relay server, sync agent, shared core and desktop client is 311,948 lines of C# and AXAML, excluding tests, translations and generated files. On 29 August 2026 the same scope was 137,879 lines by cloc.

Why did the number grow so much since August?

The code base grew in all four components between the two snapshots: the relay server, the agent, the core and the desktop client each roughly doubled or more. The table shows the per-component counts.

Are the competitor numbers current?

No. They were counted on 29 August 2026 with cloc 2.11 and were not re-counted for this update. Treat comparisons across the two dates as an order of magnitude.

Does a bigger codebase mean a better product?

No. Lines of code measure size and scope, not quality, speed or security, and different languages express the same behavior at different densities.

How was the count made?

Non-blank, non-comment C# and AXAML lines, excluding tests, documentation, translations, vendored dependencies, generated files and build output, at a fixed commit.

Why are Resilio Sync and Dropbox missing?

Their client source is not publicly verifiable, so any count would be an estimate rather than a reproducible measurement.

Sources and related reading

  1. How Foldpair works — first-party description of the relay, agent and desktop client that the count covers; the source repository is private, so the November counts are first-party measurements at commit 41a38aae0; checked November 17, 2026.
  2. cloc source-code counter — measurement tool used for the normalized source counts; checked October 5, 2026.
  3. rclone source snapshot — runtime source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  4. Nextcloud Desktop source snapshot — desktop-client source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  5. Syncthing source snapshot — continuous-sync source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  6. LocalSend source snapshot — cross-platform transfer source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  7. Seafile Desktop source snapshot — desktop-client source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  8. Unison source snapshot — two-replica synchronizer source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  9. ownCloud Desktop source snapshot — desktop-client source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  10. croc source snapshot — relay-transfer source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  11. Mutagen source snapshot — developer synchronization source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.
  12. Magic Wormhole source snapshot — command-line transfer source snapshot used for the normalized LOC count; archived 29 August 2026 count, not re-measured; checked October 5, 2026.