-
Notifications
You must be signed in to change notification settings - Fork 29
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
Create all directories before creating a new file #511
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inesusvet
requested review from
d3sch41n,
cedowens,
d0n601 and
CrimsonK1ng
as code owners
August 22, 2024 13:52
This pull request was exported from Phabricator. Differential Revision: D61658174 |
This pull request was exported from Phabricator. Differential Revision: D61658174 |
inesusvet
added a commit
to inesusvet/TTPForge
that referenced
this pull request
Aug 22, 2024
) Summary: From the golang 1.23 os/file.go ``` // Flags to OpenFile wrapping those of the underlying system. Not all // flags may be implemented on a given system. const ( // Exactly one of O_RDONLY, O_WRONLY, or O_RDWR must be specified. O_RDONLY int = syscall.O_RDONLY // open the file read-only. O_WRONLY int = syscall.O_WRONLY // open the file write-only. O_RDWR int = syscall.O_RDWR // open the file read-write. // The remaining values may be or'ed in to control behavior. O_APPEND int = syscall.O_APPEND // append data to the file when writing. O_CREATE int = syscall.O_CREAT // create a new file if none exists. O_EXCL int = syscall.O_EXCL // used with O_CREATE, file must not exist. O_SYNC int = syscall.O_SYNC // open for synchronous I/O. O_TRUNC int = syscall.O_TRUNC // truncate regular writable file when opened. ) ``` Which makes me think that we might want to call MkdirAll function before creating a file Pull Request resolved: facebookincubator#511 Resolves facebookincubator#506 Differential Revision: D61658174
inesusvet
force-pushed
the
export-D61658174
branch
from
August 22, 2024 14:48
cfb3cb5
to
8e01e28
Compare
This pull request was exported from Phabricator. Differential Revision: D61658174 |
inesusvet
added a commit
to inesusvet/TTPForge
that referenced
this pull request
Aug 22, 2024
) Summary: From the golang 1.23 os/file.go ``` // Flags to OpenFile wrapping those of the underlying system. Not all // flags may be implemented on a given system. const ( // Exactly one of O_RDONLY, O_WRONLY, or O_RDWR must be specified. O_RDONLY int = syscall.O_RDONLY // open the file read-only. O_WRONLY int = syscall.O_WRONLY // open the file write-only. O_RDWR int = syscall.O_RDWR // open the file read-write. // The remaining values may be or'ed in to control behavior. O_APPEND int = syscall.O_APPEND // append data to the file when writing. O_CREATE int = syscall.O_CREAT // create a new file if none exists. O_EXCL int = syscall.O_EXCL // used with O_CREATE, file must not exist. O_SYNC int = syscall.O_SYNC // open for synchronous I/O. O_TRUNC int = syscall.O_TRUNC // truncate regular writable file when opened. ) ``` Which makes me think that we might want to call MkdirAll function before creating a file Pull Request resolved: facebookincubator#511 Resolves facebookincubator#506 Differential Revision: D61658174
inesusvet
force-pushed
the
export-D61658174
branch
from
August 22, 2024 14:54
8e01e28
to
0f1285b
Compare
) Summary: From the golang 1.23 os/file.go ``` // Flags to OpenFile wrapping those of the underlying system. Not all // flags may be implemented on a given system. const ( // Exactly one of O_RDONLY, O_WRONLY, or O_RDWR must be specified. O_RDONLY int = syscall.O_RDONLY // open the file read-only. O_WRONLY int = syscall.O_WRONLY // open the file write-only. O_RDWR int = syscall.O_RDWR // open the file read-write. // The remaining values may be or'ed in to control behavior. O_APPEND int = syscall.O_APPEND // append data to the file when writing. O_CREATE int = syscall.O_CREAT // create a new file if none exists. O_EXCL int = syscall.O_EXCL // used with O_CREATE, file must not exist. O_SYNC int = syscall.O_SYNC // open for synchronous I/O. O_TRUNC int = syscall.O_TRUNC // truncate regular writable file when opened. ) ``` Which makes me think that we might want to call MkdirAll function before creating a file Pull Request resolved: facebookincubator#511 Resolves facebookincubator#506 Differential Revision: D61658174
This pull request was exported from Phabricator. Differential Revision: D61658174 |
inesusvet
force-pushed
the
export-D61658174
branch
from
August 22, 2024 19:56
0f1285b
to
cc55fc6
Compare
This pull request has been merged in 854023e. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: Resolves #506
Differential Revision: D61658174