#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     : %s\r\n", test );
    FileGetPath( test, buffer );
    cprintf("Path              = %s\r\n", buffer );

    FileGetName( test, buffer );
    cprintf("Name              = %s\r\n", buffer );

    cprintf("Extension         = %s\r\n", FileGetExt( test ));

    FileChangeExt( test, "ok", buffer );
    cprintf("Path with ext .ok = %s\r\n", buffer );

    cprintf( "test14.exe : file %s\r\n",
        FileExists( "test14.exe" ) ? "exists" : "missing");

    /* you can rename a file with a function like this */
//   FileRenameExt( "c:\\test\\x.x",".new");
}

