-
Notifications
You must be signed in to change notification settings - Fork 652
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
NIOFileSystem.temporaryDirectory: Consider falling back to TMPDIR #2861
Comments
That seems pretty reasonable to me. I wonder if |
For reference this is what |
I would think Besides the "expressed preference" comment from @glbrntt, there are other considerations:
For completeness, I can also see some arguments for aligning with |
CC @parkera also |
swift-foundation should be able to accommodate both use cases, and it would be nice to have a single implementation of this kind of logic. As you can see from the one we have there already, it is unfortunately not trivial. It's also something which varies dramatically depending on platform, so abstracting it once also makes sense. |
swift-nio/Sources/NIOFileSystem/FileSystem.swift
Line 638 in 30df855
Currently, NIOFS's
temporaryDirectory
uses_CS_DARWIN_USER_TEMP_DIR
on Darwin and/tmp
//data/local/tmp
anywhere else. I think we should consider the env varTMPDIR
if set.So maybe:
_CS_DARWIN_USER_TEMP_DIR
->TMPDIR
->/tmp
TMPDIR
->/tmp
TMPDIR
->/data/local/tmp
?
The text was updated successfully, but these errors were encountered: