writeToDisk() — astro Function Reference
Architecture documentation for the writeToDisk() function in mutable-data-store.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 39e92f67_35d9_d0d0_1362_ff805af84942["writeToDisk()"] ecb98618_124a_e276_dd98_561beaedc6ea["MutableDataStore"] 39e92f67_35d9_d0d0_1362_ff805af84942 -->|defined in| ecb98618_124a_e276_dd98_561beaedc6ea 869c30f5_afd6_31bc_2889_1e8921cb5502["clearTimeout()"] 869c30f5_afd6_31bc_2889_1e8921cb5502 -->|calls| 39e92f67_35d9_d0d0_1362_ff805af84942 b5e836b4_e486_8e7c_a9a7_0b1cd24656c6["toString()"] 39e92f67_35d9_d0d0_1362_ff805af84942 -->|calls| b5e836b4_e486_8e7c_a9a7_0b1cd24656c6 style 39e92f67_35d9_d0d0_1362_ff805af84942 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/mutable-data-store.ts lines 390–404
async writeToDisk() {
if (!this.#dirty) {
return;
}
if (!this.#file) {
throw new AstroError(AstroErrorData.UnknownFilesystemError);
}
try {
// Mark as clean before writing to disk so that it catches any changes that happen during the write
this.#dirty = false;
await this.#writeFileAtomic(this.#file, this.toString());
} catch (err) {
throw new AstroError(AstroErrorData.UnknownFilesystemError, { cause: err });
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does writeToDisk() do?
writeToDisk() is a function in the astro codebase, defined in packages/astro/src/content/mutable-data-store.ts.
Where is writeToDisk() defined?
writeToDisk() is defined in packages/astro/src/content/mutable-data-store.ts at line 390.
What does writeToDisk() call?
writeToDisk() calls 1 function(s): toString.
What calls writeToDisk()?
writeToDisk() is called by 1 function(s): clearTimeout.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free