@brief Opens the file with the given name in a write-only or read-write mode, returning its open file descriptor. If the file does not exist, it is created. The caller is responsible for closing the freeing the file once they are finished with it. @param Name The path of the file to open, relative or absolute. @param Flags Additional flags used to determine whether the file should be opened in,
| 1091 | /// @returns a platform-specific file descriptor if \a Name has been opened, |
| 1092 | /// otherwise an error object. |
| 1093 | inline Expected<file_t> openNativeFileForReadWrite(const Twine &Name, |
| 1094 | CreationDisposition Disp, |
| 1095 | OpenFlags Flags, |
| 1096 | unsigned Mode = 0666) { |
| 1097 | return openNativeFile(Name, Disp, FA_Write | FA_Read, Flags, Mode); |
| 1098 | } |
| 1099 | |
| 1100 | /// @brief Opens the file with the given name in a read-only mode, returning |
| 1101 | /// its open file descriptor. |