TEST14.C
资源名称:ertos.rar [点击查看]
上传用户:sunrenlu
上传日期:2022-06-13
资源大小:1419k
文件大小:1k
源码类别:
操作系统开发
开发平台:
DOS
- #include <string.h>
- #include <io.h>
- #include <stdio.h>
- #include <rtos.h>
- #include <filename.h>
- main()
- {
- char *test = "c:\brown.dog\white.cat\file.ext";
- char buffer[ 128 ];
- rt_init( 100 );
- cprintf("starting with : %srn", test );
- FileGetPath( test, buffer );
- cprintf("Path = %srn", buffer );
- FileGetName( test, buffer );
- cprintf("Name = %srn", buffer );
- cprintf("Extension = %srn", FileGetExt( test ));
- FileChangeExt( test, "ok", buffer );
- cprintf("Path with ext .ok = %srn", buffer );
- cprintf( "test14.exe : file %srn",
- FileExists( "test14.exe" ) ? "exists" : "missing");
- /* you can rename a file with a function like this */
- // FileRenameExt( "c:\test\x.x",".new");
- }