Ring1_FileSystem_setFileContents
Sets the contents of a file.
Ring1_Result
Ring1_FileSystem_setFileContents
(
char const *pathname,
void const *bytes,
size_t *numberOfBytes
)
This function sets the contents of a file.
Parameter variables
pathname
- The pathname of the file.
bytes
- The array to write.
numberOfBytes
- The number of Bytes in the array to write.
Return Values
Ring1_Result_Success
on success, Ring1_Result_Failure
on failure.
Post Conditions
If this function fails, then it sets the by-thread status variable.
Below is a list of failure conditions and the status codes indicating them.
Ring1_Status_InvalidArgument
-
pathname
and/orbytes
, isNULL
. Ring1_Status_EnvironmentFailed
- File does not exist and creation failed.
Ring1_Status_EnvironmentFailed
- File exists and is not of the right category.
Ring1_Status_EnvironmentFailed
- Settings the file's content failed.
If this function fails, then the file's existence and contents are undetermined.