( filePath: string, data: string | NodeJS.ArrayBufferView, )
| 116 | * Replaces `fs.writeFileSync(path, data, { mode: 0o600 })` + Windows ACL. |
| 117 | */ |
| 118 | export function writeSecureFile( |
| 119 | filePath: string, |
| 120 | data: string | NodeJS.ArrayBufferView, |
| 121 | ): void { |
| 122 | fs.writeFileSync(filePath, data, { mode: 0o600 }); |
| 123 | restrictFilePermissions(filePath); |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Append to a file with owner-only permissions, cross-platform. |
no test coverage detected