MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / creat

Function creat

components/dfs/dfs_v2/src/dfs_posix.c:270–273  ·  view source on GitHub ↗

* this function is a POSIX compliant version, * which will create a new file or rewrite an existing one * * @param path the path name of file. * @param mode the file permission bits to be used in creating the file (not used, can be 0) * * @return the non-negative integer on successful open, others for failed. */

Source from the content-addressed store, hash-verified

268 * @return the non-negative integer on successful open, others for failed.
269 */
270int creat(const char *path, mode_t mode)
271{
272 return open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
273}
274RTM_EXPORT(creat);
275
276/**

Callers

nothing calls this directly

Calls 1

openFunction · 0.70

Tested by

no test coverage detected