add createdir function
[scilab.git] / scilab / modules / fileio / sci_gateway / c / gw_fileio.c
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2006 - INRIA - Allan CORNET
4  * Copyright (C) 2010 - DIGITEO - Allan CORNET
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  */
13 /*--------------------------------------------------------------------------*/
14 #include "gw_fileio.h"
15 #include "callFunctionFromGateway.h"
16 #include "MALLOC.h"
17 #include "stack-c.h"
18 /*--------------------------------------------------------------------------*/ 
19 /*  interface function */
20 /*--------------------------------------------------------------------------*/ 
21 static gw_generic_table Tab[]={
22         {NULL, ""}, //mopen
23         {sci_mputstr, "mputstr"},
24         {NULL, ""}, //mclose
25         {NULL, ""}, //mput
26         {NULL, ""}, //mget
27         {sci_mgetstr, "mgetstr"},
28         {sci_meof, "meof"},
29         {sci_mseek, "mseek"},
30         {sci_mtell, "mtell"},
31         {sci_mclearerr, "mclearerr"},
32         {sci_mfprintf,"mfprintf"},
33         {sci_scanf,"mscanf"},
34         {sci_fscanf,"mfscanf"},
35         {sci_sscanf,"msscanf"},
36         {sci_fscanfMat,"fscanfMat"},
37         {sci_fprintfMat,"fprintfMat"},
38         {sci_merror, "merror"},
39         {NULL, ""}, //findfiles
40         {sci_maxfiles,"maxfiles"},
41         {sci_getdrives,"getdrives"},
42         {sci_fullpath,"fullpath"},
43         {NULL, ""}, //deletefile
44         {sci_pathsep,"pathsep"},
45         {NULL, ""}, //filesep
46         {sci_getlongpathname,"getlongpathname"},
47         {NULL ,""}, //getshortpathname
48         {NULL, ""}, //fileext
49         {NULL, ""}, //isdir
50         {sci_removedir,"removedir"},
51         {NULL,""}, //createdir
52         {NULL, ""}, // pwd
53         {NULL, ""}, //chdir
54         {NULL, ""}, //fileinfo
55         {sci_newest,"newest"},
56         {sci_getrelativefilename,"getrelativefilename"},
57         {sci_get_absolute_file_path,"get_absolute_file_path"},
58         {NULL ,""}, //copyfile
59         {NULL, ""}, //isfile
60         {NULL, ""}, //fileparts
61         {NULL, ""}, //movefile
62         {NULL, ""}, //basename
63         {NULL, ""}, //pathconvert
64         {NULL, ""} //cd
65         };
66 /*--------------------------------------------------------------------------*/ 
67 int gw_fileio(void)
68 {
69     Rhs = Max(0,Rhs);
70
71     callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
72     return 0;
73 }
74 /*--------------------------------------------------------------------------*/ 
75