Comments (3)
From your response on the other issue:
Consider I have a local developer server established on localhost:5500 that I had been served files from directory A during session one (let's call it – SESS_ONE), but 5 minutes later I served different files from directory B on the same origin of localhost:5500, yet as a new session (let's call it – SESS_TWO).
My question is as follows: Does OPFS override (should I say overwrite?) the data saved during SESS_ONE the files served from directory A in favour of directory B persistence during new re-established SESS_TWO ? As far as I do understand OPFS provides a single bucket per origin, unless those buckets are IDed internally, otherwise OPFS is what says "per origin" and that specific origin should be reserved for particular directory N? Could you elaborate a bit further on, please . I tried to dig into specification, but could not find much about it. Plus we all know that depending on user-agent vendors the implementation can slightly differ. To underline, I am particularly interested in cases of Chrome / Microsoft Edge .
For starters, the spec doesn't mention "OPFS" because there may be more than one file system per origin. See #92
The question of whether or not you'll get the same file system instance in SESS_ONE and SESS_TWO has the same answer as whether or not you'll get the same IndexedDB instance. Which is a hint that you're looking in the wrong spec :)
The FS spec specifies the algorithm for getDirectory()
. A local storage bottle map is obtained in Step 2. (What the heck is a Storage Bottle? See https://storage.spec.whatwg.org/#model) Where that local storage bottle map comes from is defined by the Storage spec
from fs.
Does OPFS override (should I say overwrite?) the data
Can't you inspect the data in the OPFS (say, using https://github.com/tomayac/opfs-explorer/) at the start of SESS_TWO to check whether it contains any data?
from fs.
Does OPFS override (should I say overwrite?) the data
Can't you inspect the data in the OPFS (say, using https://github.com/tomayac/opfs-explorer/) at the start of SESS_TWO to check whether it contains any data?
Yes, technically I can perform a use-case and see the behaviour deductively.
from fs.
Related Issues (20)
- proposals/MultipleReadersWriters.md
- File and Directory Watch Functionality for the FileSystem API HOT 1
- Clarify behavior of `createWritable()` when the corresponding file does not exist HOT 1
- Add a `FileSystemHandle.create()` method to create self
- Define File's type better (getFile()) HOT 6
- Define the Bucket File System in terms of the Storage spec
- Why is WirteParams's data both optional and nullable?
- Editorial: string formatting
- Support locking of directory entries
- Require taking a lock to remove an entry HOT 1
- FYI: TPAC 2023 WICG breakout session
- Temporary directories/files HOT 2
- New Modes of Creating a FileSystemWritableFileStream HOT 3
- No explicit file lock release when `write()` throws an exception HOT 3
- Using F_FULLFSYNC for flush() causing slow performance on Mac HOT 1
- getFile() shouldn't require a copy of the underlying data HOT 4
- Add a FileSystemFileHandle copy method
- Hyuuhhh
- POSIX style path access for OPFS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fs.