FreeBASIC  0.91.0
sys_chdir.c
Go to the documentation of this file.
1 /* chdir function */
2 
3 #include "fb.h"
4 #ifdef HOST_MINGW
5 #include <direct.h>
6 #else
7 #include <unistd.h>
8 #endif
9 
10 FBCALL int fb_ChDir( FBSTRING *path )
11 {
12  int res;
13 
14 #ifdef HOST_MINGW
15  res = _chdir( path->data );
16 #else
17  res = chdir( path->data );
18 #endif
19 
20  /* del if temp */
21  fb_hStrDelTemp( path );
22 
23  return res;
24 }