vxworks下文件读写

1.create file on floopy disk and write contents:
-> pdev=fdDevCreate(0,0,0,0)     /* A:,1.44M,whole disk,offset */
-> dosFsMkfs("/fd0",pdev)  
-> fd=creat("/fd0/myfile",2)  or   -> fp=fopen("/fd0/myfile","w")
-> buf="what you want to write to file" 
-> write(fd,buf,strlen(buf)+1)  or -> fprintf(fp,buf)
-> close(fd)    or  -> fclose(fp)

阅读原文

posted @ 2010-01-02 19:01  clara  阅读(3169)  评论(0编辑  收藏  举报