Skip to content

BuildNot yet confirmed elsewhere1 publisher3 min readPublished

Android has five storage models, and your path strings only work in one of them

A practitioner's account of building a filesystem abstraction shows where the seam has to sit: both access chains end in a stream, and almost nothing before the stream travels.

The Engineer · Build desk

How we use AISend a correction

What happened

  • A dev.to post argues a modern Android app may touch five storage models at once: app-private storage, MediaStore, SAF, cloud-backed document providers and plain JVM file APIs.
  • SAF hands the app a content:// tree URI rather than a path, and the platform expects ContentResolver and DocumentsContract instead of File.
  • The author says that spread is what pushed them to build a filesystem abstraction covering both Android and the JVM.

Why it matters

  • cost Every relative path a library agrees to accept has to be paid for in provider operations, and the library author owns that bill because the platform will not resolve the string for them.
  • constraint String concatenation as path building is off the table, so any API that takes a path has to carry a resolver behind it or narrow its promise to opening streams.
  • exposure Timing and availability assumptions behind the word "file" now rest on a provider the developer never chose and cannot identify from the URI.
  • decision Teams have to pick which model is canonical for their app before writing the storage layer, because taking a directory grant is what drags the other four into the codebase.

The seam worth arguing about is the single place the two access chains agree: both of them end in a stream [5]. Before that, one has a path that becomes a `File`, and the other has a URI that becomes a `ContentResolver` or `DocumentsContract` call into a provider [4][5]. That fixes the limit of what a cross-platform storage layer can honestly promise. Handing back an `InputStream` travels [15]. Doing arithmetic on names does not [8].

The worked example in the post is worth counting. A library whose API takes `documents/example.txt` gets that for free on the JVM, where the string is a path to something on a filesystem [8]. Under a user-selected SAF tree, the same string has to be walked: the selected root, then `Documents`, then `projects`, then the file [10], and each step is a document-provider operation rather than a traversal of a mounted filesystem [9]. Three segments below the root, three provider operations [13]. The string also carries no handle to any of the intermediate documents [8], so anything resembling a working directory, or a cache of resolved parents, is something the library has to invent rather than something the platform hands over.

The indirection that makes this expensive is the same indirection the author praises. A granted document tree may be backed by a provider that is not local device storage at all, possibly remote or cloud-backed, and the application does not need to know which [7]. The post calls that one of the most powerful ideas behind SAF [7], and in the next breath warns that an abstraction which tries to hide every difference can be made worse by the hiding [12]. Those two positions are compatible only if the leak is deliberate: the layer resolves, opens and streams, and refuses to pretend it can tell you a parent path.

Which is why the count of five is a ceiling rather than a requirement. The post's own routing is narrow: application data belongs in application-private storage, supported shared media belongs in MediaStore, and SAF earns its keep when the requirement is specifically that a user picks a directory and the application then works inside it [6]. Strip that requirement and two models cover the app, not five [14]. Scoped storage is described as having made storage simpler for many applications for exactly this reason, since private directories plus the appropriate platform APIs remove the need for unrestricted access to the user's shared filesystem [11].

The cost, then, sits in an application's internal vocabulary rather than in any API surface. Code that passes `String` paths between its own modules has already decided it is running on a filesystem. This is one practitioner's account of building such a library [c2b], not a platform announcement, and the supplied text breaks off mid-sentence on the question of how much difference an abstraction should hide [12].

What to watch

  • Whether the author publishes the rest of the argument the supplied text cuts off, on how much difference an abstraction should hide.
  • Whether DocumentsContract gains a resolve-by-relative-path call, which would remove the per-segment provider cost that libraries currently absorb.
  • Whether third-party cloud services actually ship document providers users grant trees to, since that is what makes the provider indirection load-bearing rather than theoretical.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence42
Adoption
Insufficient
Hype gap+12
Incentives55
Confidence45
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    A modern Android application may interact with application-private storage, shared media through MediaStore, user-selected documents through the Storage Access Framework (SAF), cloud-backed document providers, and traditional JVM filesystem APIs.

    ReportedSupportedSource: dev.to post by the author of an Android/JVM filesystem abstractionView cited source
  2. [2]

    The author writes that the difficult part is not learning any one of these APIs, but building software that can work with different kinds of storage without forcing the entire application to understand the differences.

    ReportedSupportedSource: dev.to postView cited source
  3. [3]

    The author says that problem is what led them to build a filesystem abstraction for Android and the JVM.

    ReportedSupportedSource: dev.to postView cited source

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · August 23, 2026

    Android Storage in 2026: Scoped Storage, SAF, and Why Filesystem Abstractions Still Matter

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Entities

Loading related stories