(path: string)
| 1079 | }; |
| 1080 | |
| 1081 | const fsyncDirectory = (path: string): void => { |
| 1082 | try { |
| 1083 | const fd = fs.openSync(path, "r"); |
| 1084 | try { |
| 1085 | fs.fsyncSync(fd); |
| 1086 | } finally { |
| 1087 | fs.closeSync(fd); |
| 1088 | } |
| 1089 | } catch { |
| 1090 | // Some platforms/filesystems do not allow fsync on directories. The rename |
| 1091 | // still happened; this is best-effort durability hardening. |
| 1092 | } |
| 1093 | }; |
| 1094 | |
| 1095 | const fsyncSqliteFileSet = (path: string): void => { |
| 1096 | for (const suffix of fileSetSuffixes) fsyncFileIfExists(`${path}${suffix}`); |
no outgoing calls
no test coverage detected