open函数

fd = open("test.txt", O_RDWR | O_CREAT | O_TRUNC );//不存在则创建,然后以可读写打开;存在则以可读写打开,将长度截短为0.

原文地址:https://www.cnblogs.com/helloweworld/p/2731633.html