Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atomic file writing #5594

Open
kkebo opened this issue Oct 19, 2024 · 0 comments
Open

Atomic file writing #5594

kkebo opened this issue Oct 19, 2024 · 0 comments

Comments

@kkebo
Copy link

kkebo commented Oct 19, 2024

derived from #5593

Description

Currently, SwiftWasm doesn't support the following code for wasm32-unknown-wasi:

import Foundation
Data().write(to: URL(filePath: "hoge"), options: .atomic)

It's because the option .atomic requires creating a temporary file, and swift-foundation doesn't support it if os(WASI).

Ideas

One idea: #5593 (comment)

How about allowing atomic file writing when TMPDIR environment variable is explicitly defined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant