summaryrefslogtreecommitdiff
path: root/modules/fileio/includes
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fileio/includes')
-rwxr-xr-xmodules/fileio/includes/FileExist.h34
-rwxr-xr-xmodules/fileio/includes/FindFileExtension.h27
-rwxr-xr-xmodules/fileio/includes/URIFileToFilename.h34
-rwxr-xr-xmodules/fileio/includes/addfile.h34
-rwxr-xr-xmodules/fileio/includes/cluni0.h33
-rwxr-xr-xmodules/fileio/includes/createdirectory.h37
-rwxr-xr-xmodules/fileio/includes/createtempfilename.h32
-rwxr-xr-xmodules/fileio/includes/deleteafile.h34
-rwxr-xr-xmodules/fileio/includes/delfile.h24
-rwxr-xr-xmodules/fileio/includes/diary.h43
-rwxr-xr-xmodules/fileio/includes/dynlib_fileio.h29
-rwxr-xr-xmodules/fileio/includes/expandPathVariable.h42
-rwxr-xr-xmodules/fileio/includes/filesmanagement.h222
-rwxr-xr-xmodules/fileio/includes/findfiles.h31
-rwxr-xr-xmodules/fileio/includes/fullpath.h39
-rwxr-xr-xmodules/fileio/includes/getFullFilename.h34
-rwxr-xr-xmodules/fileio/includes/getfiledesc.h27
-rwxr-xr-xmodules/fileio/includes/getfileinfo.h26
-rwxr-xr-xmodules/fileio/includes/getfiletype.h29
-rwxr-xr-xmodules/fileio/includes/getshortpathname.h33
-rwxr-xr-xmodules/fileio/includes/gw_fileio.h68
-rwxr-xr-xmodules/fileio/includes/isdir.h35
-rwxr-xr-xmodules/fileio/includes/mclose.h31
-rwxr-xr-xmodules/fileio/includes/mget.h33
-rwxr-xr-xmodules/fileio/includes/mgetl.h50
-rwxr-xr-xmodules/fileio/includes/mopen.h42
-rwxr-xr-xmodules/fileio/includes/mput.h32
-rwxr-xr-xmodules/fileio/includes/mseek.h24
-rwxr-xr-xmodules/fileio/includes/mtell.h25
-rwxr-xr-xmodules/fileio/includes/readline.h66
-rwxr-xr-xmodules/fileio/includes/removedir.h35
-rwxr-xr-xmodules/fileio/includes/scicurdir.h48
-rwxr-xr-xmodules/fileio/includes/sendtorecyclebin.h22
-rwxr-xr-xmodules/fileio/includes/splitpath.h45
34 files changed, 1400 insertions, 0 deletions
diff --git a/modules/fileio/includes/FileExist.h b/modules/fileio/includes/FileExist.h
new file mode 100755
index 000000000..ede166e04
--- /dev/null
+++ b/modules/fileio/includes/FileExist.h
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2005 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __FILEEXIST_H__
+#define __FILEEXIST_H__
+
+#include <wchar.h>
+#include "dynlib_fileio.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* verify if filename is a valid file
+* @param filename a string
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL FileExist(char *filename);
+
+/**
+* verify if filename is a valid file
+* @param filename a wide string
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL FileExistW(wchar_t *wcfilename);
+/*--------------------------------------------------------------------------*/
+#endif /* __FILEEXIST_H__ */
diff --git a/modules/fileio/includes/FindFileExtension.h b/modules/fileio/includes/FindFileExtension.h
new file mode 100755
index 000000000..73d824d68
--- /dev/null
+++ b/modules/fileio/includes/FindFileExtension.h
@@ -0,0 +1,27 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __FINDFILEEXTENSION_H__
+#define __FINDFILEEXTENSION_H__
+
+#include "dynlib_fileio.h"
+
+/**
+* Searches a path for an extension
+* @param[in] pathname
+* @return the address of the "." preceding the extension
+* NULL character otherwise.
+*/
+FILEIO_IMPEXP char *FindFileExtension(char *filename);
+
+#endif /* __FINDFILEEXTENSION_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/URIFileToFilename.h b/modules/fileio/includes/URIFileToFilename.h
new file mode 100755
index 000000000..5f5069c5b
--- /dev/null
+++ b/modules/fileio/includes/URIFileToFilename.h
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+/*--------------------------------------------------------------------------*/
+#ifndef __URIFILETOFILENAME_H__
+#define __URIFILETOFILENAME_H__
+#include "dynlib_fileio.h"
+#include "BOOL.h"
+
+/**
+* convert URI File (file://path/filename.ext) to standard filename
+* @param[in] uri : a string URI file
+* @return a filename
+*/
+FILEIO_IMPEXP char *URIFileToFilename(char *uri);
+
+/**
+* check if it is a URIFile
+* @param [in] uri : a string URI file
+* @return TRUE or FALSE;
+*/
+FILEIO_IMPEXP BOOL isURIFile(char *uri);
+
+#endif /* __URIFILETOFILENAME_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/addfile.h b/modules/fileio/includes/addfile.h
new file mode 100755
index 000000000..6133ee00b
--- /dev/null
+++ b/modules/fileio/includes/addfile.h
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __ADDFILE_H__
+#define __ADDFILE_H__
+
+#include <stdio.h>
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+ *add a file in the files table
+ *
+ * @param fd
+ * @param fa
+ * @param swap2
+ * @param type
+ * @param mode
+ * @param filename
+ * @param ierr
+ */
+FILEIO_IMPEXP void C2F(addfile)(int *fd, FILE *fa, int *swap2, int *type, int *mode, char *filename, int *ierr);
+
+#endif /* __ADDFILE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/cluni0.h b/modules/fileio/includes/cluni0.h
new file mode 100755
index 000000000..41405b340
--- /dev/null
+++ b/modules/fileio/includes/cluni0.h
@@ -0,0 +1,33 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Sylvestre LEDRU
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+#ifndef __CLUNI0_H__
+#define __CLUNI0_H__
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* !!! DEPRECATED see expandPathVariable.h !!!
+*/
+
+/**
+ * expand in_name to produce out_name
+ *
+ * @param in_name the input string that we want to expand
+ * @param out_name the output string
+ * @param out_n number of character of out_name
+ * @param lin length of in_name
+ * @param lout length of out_name
+ * @return 0
+ */
+FILEIO_IMPEXP int C2F(cluni0)(char *in_name, char *out_name, int *out_n, long int lin, long int lout);
+
+#endif /* __CLUNI0_H__ */
diff --git a/modules/fileio/includes/createdirectory.h b/modules/fileio/includes/createdirectory.h
new file mode 100755
index 000000000..8ae53fefe
--- /dev/null
+++ b/modules/fileio/includes/createdirectory.h
@@ -0,0 +1,37 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __CREATEDIRECTORY_H__
+#define __CREATEDIRECTORY_H__
+
+#include <wchar.h>
+
+#include "dynlib_fileio.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* Create a directory
+* @param path the path of the futur directory
+* @return the result of the operation TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL createdirectory(const char *path);
+
+/**
+* Create a directory (wide string)
+* @param path the path of the futur directory
+* @return the result of the operation TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL createdirectoryW(const wchar_t *path);
+
+
+#endif /* __CREATEDIRECTORY_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/createtempfilename.h b/modules/fileio/includes/createtempfilename.h
new file mode 100755
index 000000000..4964138f9
--- /dev/null
+++ b/modules/fileio/includes/createtempfilename.h
@@ -0,0 +1,32 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __CREATETEMPFILENAME_H__
+#define __CREATETEMPFILENAME_H__
+
+#include "dynlib_fileio.h"
+#include "charEncoding.h"
+#include "BOOL.h"
+
+/**
+* Create file with unique file name in TMPDIR
+* TMPDIR/PREFIX[XXXXXXX]
+* @param[in] prefix
+* @param[in] bShortFormat
+* @return a unique filename
+*/
+FILEIO_IMPEXP char *createtempfilename(const char *prefix, BOOL bShortFormat);
+
+FILEIO_IMPEXP wchar_t *createtempfilenameW(const wchar_t *wcprefix, BOOL bShortFormat);
+
+#endif /* __CREATETEMPFILENAME_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/deleteafile.h b/modules/fileio/includes/deleteafile.h
new file mode 100755
index 000000000..55ff06d6a
--- /dev/null
+++ b/modules/fileio/includes/deleteafile.h
@@ -0,0 +1,34 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __DELETEAFILE_H__
+#define __DELETEAFILE_H__
+
+#include <wchar.h>
+#include "BOOL.h"
+#include "dynlib_fileio.h"
+/**
+* delete a file by filename
+* @param[in] filename
+* @return BOOLEAN TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL deleteafile(char *filename);
+
+/**
+* delete a file by filename
+* @param[in] filenameW wide string
+* @return BOOLEAN TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL deleteafileW(wchar_t *filenameW);
+
+#endif /* __DELETEAFILE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/delfile.h b/modules/fileio/includes/delfile.h
new file mode 100755
index 000000000..5250155d4
--- /dev/null
+++ b/modules/fileio/includes/delfile.h
@@ -0,0 +1,24 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __DELFILE_H__
+#define __DELFILE_H__
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* delete a file in the files table
+*/
+FILEIO_IMPEXP void C2F(delfile)(int *fd);
+
+#endif /* __DELFILE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/diary.h b/modules/fileio/includes/diary.h
new file mode 100755
index 000000000..e7a920573
--- /dev/null
+++ b/modules/fileio/includes/diary.h
@@ -0,0 +1,43 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Sylvestre LEDRU
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __DIARY_H__
+#define __DIARY_H__
+
+#include "BOOL.h"
+
+/**
+* Get File ID descriptor of the diary
+* @return File ID
+*/
+int getdiary(void);
+
+/**
+* Diary (writes in a file)
+* @param str : string to write
+* @param addCR : to add a '\n'
+*/
+void diary(char *str, BOOL addCR);
+
+/**
+* Close diaries
+*/
+BOOL closeAllDiaries(void);
+
+/**
+* Set diary ID
+*/
+void setDiaryId(int fd);
+
+
+#endif /* __DIARY_H__ */
+
diff --git a/modules/fileio/includes/dynlib_fileio.h b/modules/fileio/includes/dynlib_fileio.h
new file mode 100755
index 000000000..ce41774e8
--- /dev/null
+++ b/modules/fileio/includes/dynlib_fileio.h
@@ -0,0 +1,29 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2009 - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/
+#ifndef __DYNLIB_FILEIO_H__
+#define __DYNLIB_FILEIO_H__
+
+#ifdef _MSC_VER
+#ifdef FILEIO_EXPORTS
+#define FILEIO_IMPEXP __declspec(dllexport)
+#else
+#define FILEIO_IMPEXP __declspec(dllimport)
+#endif
+#else
+#define FILEIO_IMPEXP
+#endif
+
+#endif /* __DYNLIB_FILEIO_H__ */
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/fileio/includes/expandPathVariable.h b/modules/fileio/includes/expandPathVariable.h
new file mode 100755
index 000000000..fae777a9b
--- /dev/null
+++ b/modules/fileio/includes/expandPathVariable.h
@@ -0,0 +1,42 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __EXPANDPATHVARIABLE_H__
+#define __EXPANDPATHVARIABLE_H__
+
+#include <wchar.h>
+#include "dynlib_fileio.h"
+
+/**
+* expanded variables are:
+* "SCI"
+* "SCIHOME"
+* "HOME"
+* "TMPDIR"
+*/
+
+/**
+* expand in_name to produce out_name
+* @param[in] string where to find a variable and expand
+* @return string with expanded variable
+*/
+FILEIO_IMPEXP char *expandPathVariable(char* str);
+
+/**
+* expand in_name to produce out_name (wide string)
+* @param[in] wide string where to find a variable and expand
+* @return wide string with expanded variable
+*/
+FILEIO_IMPEXP wchar_t *expandPathVariableW(wchar_t *wcstr);
+
+#endif /* __EXPANDPATHVARIABLE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/filesmanagement.h b/modules/fileio/includes/filesmanagement.h
new file mode 100755
index 000000000..697294682
--- /dev/null
+++ b/modules/fileio/includes/filesmanagement.h
@@ -0,0 +1,222 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+
+#ifndef __FILESMANAGEMENT_H__
+#define __FILESMANAGEMENT_H__
+
+#include <stdio.h>
+#include "dynlib_fileio.h"
+#include "BOOL.h"
+
+/* ID returned if File is not defined */
+#define FILE_ID_NOT_DEFINED -100
+
+/**
+* Default max of files opened in scilab
+*/
+#ifdef FOPEN_MAX
+#define DEFAULT_MAX_FILES FOPEN_MAX
+#else
+#define DEFAULT_MAX_FILES 20
+#endif
+/**
+* Get max of files opened in scilab
+* @return max of files opened in scilab
+*/
+FILEIO_IMPEXP int GetMaximumFileOpenedInScilab(void);
+
+/**
+* Get the file associated to int Id
+* @param Id
+* @return FILE ptr
+*/
+FILEIO_IMPEXP FILE *GetFileOpenedInScilab(int Id);
+
+/**
+* Set the file associated to int Id
+* @param FILE ptr
+* @param Id
+*/
+FILEIO_IMPEXP void SetFileOpenedInScilab(int Id, FILE *fptr);
+
+/**
+* Get the current Id (current file)
+* @return Id
+*/
+FILEIO_IMPEXP int GetCurrentFileId(void);
+
+/**
+* Get the previous Id (previous file)
+* @return Id
+*/
+FILEIO_IMPEXP int GetPreviousFileId(void);
+
+/**
+* Set the current Id (current file)
+* @param Id
+*/
+FILEIO_IMPEXP void SetCurrentFileId(int Id);
+
+/**
+* Get the swap status of file Id
+* @param Id
+* @return swap status
+*/
+FILEIO_IMPEXP int GetSwapStatus(int Id);
+
+/**
+* Set the swap status of file Id
+* @param Id
+* @param new swap
+*/
+FILEIO_IMPEXP void SetSwapStatus(int Id, int newswap);
+
+/**
+* Get the mode of file Id
+* @param Id
+* @return mode
+*/
+FILEIO_IMPEXP int GetFileModeOpenedInScilab(int Id);
+
+/**
+* Set the mode of file Id
+* @param Id
+* @param new mode
+*/
+FILEIO_IMPEXP void SetFileModeOpenedInScilab(int Id, int mode);
+
+/**
+* Get the type of file Id
+* @param Id
+* @return Type (Fortran,C)
+*/
+FILEIO_IMPEXP int GetFileTypeOpenedInScilab(int Id);
+
+
+/**
+* Get the type of file Id
+* @param Id
+* @return Type 'C' or 'F' (Fortran,C) (to free)
+*/
+FILEIO_IMPEXP char *GetFileTypeOpenedInScilabAsString(int Id);
+
+/**
+* Set the mode of file Id
+* @param Id
+* @param new Type (Fortran,C)
+*/
+FILEIO_IMPEXP void SetFileTypeOpenedInScilab(int Id, int Type);
+
+/**
+* Get the name of file Id
+* @param Id
+* @return name
+*/
+FILEIO_IMPEXP char* GetFileNameOpenedInScilab(int Id);
+
+/**
+* Set the name of file Id
+* @param Id
+* @param new name
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL SetFileNameOpenedInScilab(int Id, char *name);
+
+/**
+* Free filename of file Id
+* @param Id
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL FreeFileNameOpenedInScilab(int Id);
+
+/**
+* Initialize Scilab's file list
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL InitializeScilabFilesList(void);
+
+/**
+* Terminate Scilab's file list
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL TerminateScilabFilesList(void);
+
+/**
+* Extend Scilab's file list
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL ExtendScilabFilesList(int NewSize);
+
+/**
+* Search if filename is already opened in Scilab
+* @return TRUE or FALSE
+*/
+FILEIO_IMPEXP BOOL IsAlreadyOpenedInScilab(char *filename);
+
+/**
+* Get ID of a filename opened in scilab
+* @param[in] filename
+* @return file ID or FILE_ID_NOT_DEFINED
+*/
+FILEIO_IMPEXP int GetIdFromFilename(char *filename);
+
+/**
+* Get Ids opened in Scilab
+* @param[out] size of returned array
+* @return Array of Id
+*/
+FILEIO_IMPEXP double *GetFilesIdUsed(int *sizeArrayReturned);
+
+/**
+* Get Ids opened in Scilab
+* @param[out] size of returned array
+* @return Array of Id
+*/
+FILEIO_IMPEXP double *GetSwapsUsed(int *sizeArrayReturned);
+
+/**
+* Get Modes used in Scilab
+* @param[out] size of returned array
+* @return Modes associated to Id
+*/
+FILEIO_IMPEXP double *GetModesUsed(int *sizeArrayReturned);
+
+/**
+* Get Types used in Scilab
+* @param[out] size of returned array
+* @return Types associated to Id
+*/
+FILEIO_IMPEXP int *GetTypesUsed(int *sizeArrayReturned);
+
+/**
+* Get Types used in Scilab
+* @param[out] size of returned array
+* @return Types associated to Id as Strings (user reading)
+*/
+FILEIO_IMPEXP char **GetTypesUsedAsString(int *sizeArrayReturned);
+
+/**
+* Get filenames used in Scilab
+* @param[out] size of returned array
+* @return filenames
+*/
+FILEIO_IMPEXP char **GetFilenamesUsed(int *sizeArrayReturned);
+
+/**
+* Get number of Ids Used in Scilab
+* @return number of Ids
+*/
+FILEIO_IMPEXP int GetNumberOfIdsUsed(void);
+
+#endif /* __FILESMANAGEMENT_H__ */
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/fileio/includes/findfiles.h b/modules/fileio/includes/findfiles.h
new file mode 100755
index 000000000..7be8dc17a
--- /dev/null
+++ b/modules/fileio/includes/findfiles.h
@@ -0,0 +1,31 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __FINDFILES_H__
+#define __FINDFILES_H__
+
+#include "dynlib_fileio.h"
+#include "BOOL.h"
+
+/**
+* Finding all files in a directory with a given filespec
+* @param path example : "c:\"
+* @param filespec example : "*.sce"
+* @param[out] sizeListReturned the size of the files list
+* @param[in] if TRUE display a warning if path does not exist
+* @return all the files except '.' & '..'
+*/
+
+FILEIO_IMPEXP char **findfiles(char *path, char *filespec, int *sizeListReturned, BOOL warning);
+
+#endif /* __FINDFILES_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/fullpath.h b/modules/fileio/includes/fullpath.h
new file mode 100755
index 000000000..887c8bc49
--- /dev/null
+++ b/modules/fileio/includes/fullpath.h
@@ -0,0 +1,39 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __FULLPATH_H__
+#define __FULLPATH_H__
+
+#include "dynlib_fileio.h"
+
+/**
+* Creates an absolute or full path name for the specified relative path name.
+* @param[out] absPath Pointer to a buffer containing the absolute or full path name, or NULL.
+* @param[in] relPath Relative path name.
+* @param[in] maxLength Maximum length of the absolute path name buffer (absPath).
+* @return returns a pointer to a buffer containing the absolute path name (absPath).
+*/
+
+FILEIO_IMPEXP char * get_full_path(char * _FullPath, const char * _Path, size_t _SizeInBytes);
+
+/**
+* Creates an absolute or full path name for the specified relative path name.
+* @param[out] absPath Pointer to a buffer containing the absolute or full path name, or NULL.
+* @param[in] relPath Relative path name.
+* @param[in] maxLength Maximum length of the absolute path name buffer (absPath).
+* @return returns a pointer to a buffer containing the absolute path name (absPath).
+* "localized" on windows (Wide char)
+*/
+FILEIO_IMPEXP wchar_t * get_full_pathW(wchar_t * _wcFullPath, const wchar_t * _wcPath, size_t _SizeInBytes);
+
+#endif
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/getFullFilename.h b/modules/fileio/includes/getFullFilename.h
new file mode 100755
index 000000000..64f899dae
--- /dev/null
+++ b/modules/fileio/includes/getFullFilename.h
@@ -0,0 +1,34 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2009 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __GETFULLFILENAME_H__
+#define __GETFULLFILENAME_H__
+
+#include <wchar.h>
+#include "dynlib_fileio.h"
+
+/**
+* get full filename of a file (wide string)
+* @param[in] FilenameInput can be a relative path
+* @return a full filename (path expanded)
+*/
+FILEIO_IMPEXP wchar_t *getFullFilenameW(wchar_t* FilenameInput);
+
+/**
+* get full filename of a file
+* @param[in] FilenameInput can be a relative path
+* @return a full filename (path expanded)
+*/
+FILEIO_IMPEXP char *getFullFilename(char* Filename);
+
+#endif /* __GETFULLFILENAME_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/getfiledesc.h b/modules/fileio/includes/getfiledesc.h
new file mode 100755
index 000000000..d7f37891d
--- /dev/null
+++ b/modules/fileio/includes/getfiledesc.h
@@ -0,0 +1,27 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __GETFILEDESC_H__
+#define __GETFILEDESC_H__
+
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* returns the first available position in Files descriptor Table
+* @param fd (id)
+* @param[out] fd (-1 error)
+*/
+FILEIO_IMPEXP void C2F(getfiledesc)(int *fd);
+
+#endif /* __GETFILEDESC_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/getfileinfo.h b/modules/fileio/includes/getfileinfo.h
new file mode 100755
index 000000000..9d3a8f46d
--- /dev/null
+++ b/modules/fileio/includes/getfileinfo.h
@@ -0,0 +1,26 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __GETFILEINFO_H__
+#define __GETFILEINFO_H__
+
+#include <stdio.h>
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* get file info in the files table
+*/
+FILEIO_IMPEXP void C2F(getfileinfo)(int *fd, FILE *fa, int *swap, int *type, int *mode, char *filename, int *lf, int *ierr);
+
+#endif /* __GETFILEINFO_H__ */
+
diff --git a/modules/fileio/includes/getfiletype.h b/modules/fileio/includes/getfiletype.h
new file mode 100755
index 000000000..4fa71af4d
--- /dev/null
+++ b/modules/fileio/includes/getfiletype.h
@@ -0,0 +1,29 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __GETFILETYPE_H__
+#define __GETFILETYPE_H__
+
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+ * get file type (Fortran or C)
+ *
+ * @param fd
+ * @param type
+ * @param ierr
+ */
+FILEIO_IMPEXP void C2F(getfiletype)(int *fd, int *type, int *ierr);
+
+#endif /* __GETFILETYPE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/getshortpathname.h b/modules/fileio/includes/getshortpathname.h
new file mode 100755
index 000000000..220e69cb0
--- /dev/null
+++ b/modules/fileio/includes/getshortpathname.h
@@ -0,0 +1,33 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __GETSHORTPATHNAME_H__
+#define __GETSHORTPATHNAME_H__
+
+#include "dynlib_fileio.h"
+#include "machine.h" /* C2F */
+#include "BOOL.h" /* BOOL */
+
+/**
+* Retrieves the short path form of the specified path
+* @param[in] long path name
+* @param[out] TRUE if conversion is ok
+* @return short path name
+* on Linux returns same path name
+* used for Windows
+*/
+FILEIO_IMPEXP char *getshortpathname(char *longpathname, BOOL *convertok);
+
+FILEIO_IMPEXP int C2F(getshortpathname)(char *pathname, int *len);
+
+#endif /* __GETSHORTPATHNAME_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/gw_fileio.h b/modules/fileio/includes/gw_fileio.h
new file mode 100755
index 000000000..566cd38fd
--- /dev/null
+++ b/modules/fileio/includes/gw_fileio.h
@@ -0,0 +1,68 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __GW_FILEIO_H__
+#define __GW_FILEIO_H__
+#include "dynlib_fileio.h"
+/*--------------------------------------------------------------------------*/
+FILEIO_IMPEXP int gw_fileio(void);
+/*--------------------------------------------------------------------------*/
+int sci_meof(char *fname, unsigned long fname_len);
+int sci_mopen(char *fname, unsigned long fname_len);
+int sci_mclose(char *fname, unsigned long fname_len);
+int sci_merror(char *fname, unsigned long fname_len);
+int sci_mputstr(char *fname, unsigned long fname_len);
+int sci_mput(char *fname, unsigned long fname_len);
+int sci_mget(char *fname, unsigned long fname_len);
+int sci_mgetstr(char *fname, unsigned long fname_len);
+int sci_mseek(char *fname, unsigned long fname_len);
+int sci_mtell(char *fname, unsigned long fname_len);
+int sci_mclearerr(char *fname, unsigned long fname_len);
+int sci_fscanfMat(char *fname, unsigned long fname_len);
+int sci_mfprintf(char *fname, unsigned long fname_len);
+int sci_scanf(char *fname, unsigned long fname_len);
+int sci_fprintfMat(char *fname, unsigned long fname_len);
+int sci_sscanf(char *fname, unsigned long fname_len);
+int sci_fscanf(char *fname, unsigned long fname_len);
+int sci_findfiles(char *fname, unsigned long fname_len);
+int sci_maxfiles(char *fname, unsigned long fname_len);
+int sci_getdrives(char *fname, unsigned long fname_len);
+int sci_fullpath(char *fname, unsigned long fname_len);
+int sci_deletefile(char *fname, unsigned long fname_len);
+int sci_pathsep(char *fname, unsigned long fname_len);
+int sci_filesep(char *fname, unsigned long fname_len);
+int sci_getlongpathname(char *fname, unsigned long fname_len);
+int sci_getshortpathname(char *fname, unsigned long fname_len);
+int sci_fileext(char *fname, unsigned long fname_len);
+int sci_isdir(char *fname, unsigned long fname_len);
+int sci_createdir(char *fname, unsigned long fname_len);
+int sci_removedir(char *fname, unsigned long fname_len);
+int sci_chdir(char *fname, unsigned long fname_len);
+int sci_pwd(char *fname, unsigned long fname_len);
+int sci_fileinfo(char *fname, unsigned long fname_len);
+int sci_newest(char *fname, unsigned long fname_len);
+int sci_getrelativefilename(char *fname, unsigned long l);
+int sci_get_absolute_file_path(char *fname, unsigned long fname_len);
+int sci_copyfile(char *fname, unsigned long fname_len);
+int sci_isfile(char *fname, unsigned long fname_len);
+int sci_fileparts(char *fname, unsigned long fname_len);
+int sci_movefile(char *fname, unsigned long fname_len);
+int sci_basename(char *fname, unsigned long fname_len);
+int sci_pathconvert(char *fname, unsigned long fname_len);
+int sci_mgetl(char *fname, unsigned long fname_len);
+int sci_mputl(char *fname, unsigned long fname_len);
+int sci_tempname(char *fname, unsigned long fname_len);
+int sci_getURL(char *fname, unsigned long fname_len);
+int sci_splitURL(char *fname, unsigned long fname_len);
+/*--------------------------------------------------------------------------*/
+#endif /* __GW_FILEIO_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/isdir.h b/modules/fileio/includes/isdir.h
new file mode 100755
index 000000000..415fab0e8
--- /dev/null
+++ b/modules/fileio/includes/isdir.h
@@ -0,0 +1,35 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __ISDIR_H__
+#define __ISDIR_H__
+
+#include <wchar.h>
+#include "dynlib_fileio.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* Check if a directory exists or not
+* @param path the directory
+* @return if the directory exists (TRUE) or not (FALSE)
+*/
+FILEIO_IMPEXP BOOL isdir(const char *path);
+
+/**
+* Check if a directory exists or not
+* @param path the directory (wide string)
+* @return if the directory exists (TRUE) or not (FALSE)
+*/
+FILEIO_IMPEXP BOOL isdirW(const wchar_t *wcpath);
+#endif /* __ISDIR_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/mclose.h b/modules/fileio/includes/mclose.h
new file mode 100755
index 000000000..8357c8da2
--- /dev/null
+++ b/modules/fileio/includes/mclose.h
@@ -0,0 +1,31 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __MCLOSE_H__
+#define __MCLOSE_H__
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/*--------------------------------------------------------------------------*/
+#define ALL_FILES_DESCRIPTOR -2
+/*--------------------------------------------------------------------------*/
+
+/**
+* close the file with id *fd
+* if *id != -1 and *id != -2
+* the current file if *id = -1
+* all opened file if *id = -2
+*/
+FILEIO_IMPEXP void C2F(mclose) (int *fd, double *res);
+
+#endif /* __MCLOSE_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/mget.h b/modules/fileio/includes/mget.h
new file mode 100755
index 000000000..4f5bb67bd
--- /dev/null
+++ b/modules/fileio/includes/mget.h
@@ -0,0 +1,33 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __MGET_H__
+#define __MGET_H__
+
+#include <stdio.h>
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* mget functions read data in a machine
+* independant way (i.e write in little-endian)
+* or can be used to read in little or big endian
+* if read fails *ierr contains the number of properly read items
+*/
+FILEIO_IMPEXP void C2F(mget) (int *fd, double *res, int *n, const char *type, int *ierr);
+
+FILEIO_IMPEXP void C2F(mgetnc)(int *fd, void * res, int *n1, const char *type, int *ierr);
+
+FILEIO_IMPEXP void mget2(FILE *fa, int swap, double *res, int n, const char *type, int *ierr);
+
+#endif /* __MGET_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/mgetl.h b/modules/fileio/includes/mgetl.h
new file mode 100755
index 000000000..aae9f8546
--- /dev/null
+++ b/modules/fileio/includes/mgetl.h
@@ -0,0 +1,50 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2010 - DIGITEO - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __MGETL_H__
+#define __MGETL_H__
+
+#include "dynlib_fileio.h"
+#include "charEncoding.h"
+
+typedef enum
+{
+ MGETL_NO_ERROR = 0,
+ MGETL_EOF = 1,
+ MGETL_MEMORY_ALLOCATION_ERROR = 2,
+ MGETL_ERROR = 3
+} mgetlError;
+
+/* file descriptor id for stdin */
+#define STDIN_ID 5
+/* file descriptor id for stdout */
+#define STDOUT_ID 6
+
+/**
+ * @fn char ** mgetl(int fd, int nbLinesIn, int *nbLinesOut, int *ierr) #endif
+ *
+ * @brief read lines of a file.
+ *
+ * @author Allan Cornet
+ * @date 4/16/2010
+ *
+ * @param fd The file descriptor id.
+ * @param nbLinesIn The nb lines in .
+ * @param [in,out] nbLinesOut If non-null, the nb lines out.
+ * @param [in,out] ierr If non-null, the ierr.
+ *
+ * @return null if it fails, else strings readed.
+**/
+FILEIO_IMPEXP char ** mgetl(int fd, int nbLinesIn, int *nbLinesOut, int *ierr);
+
+#endif /* __MGETL_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/mopen.h b/modules/fileio/includes/mopen.h
new file mode 100755
index 000000000..38de451fe
--- /dev/null
+++ b/modules/fileio/includes/mopen.h
@@ -0,0 +1,42 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __MOPEN_H__
+#define __MOPEN_H__
+
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* Opens file given by file and return it's id
+* @param[out] fd (id)
+* @param filename
+* @param status "r","w","a" or "rb","wb","ab"
+* @param swap
+* @param[out] res
+* @param[out] error
+*/
+
+typedef enum
+{
+ MOPEN_NO_ERROR = 0,
+ MOPEN_NO_MORE_LOGICAL_UNIT = 1,
+ MOPEN_CAN_NOT_OPEN_FILE = 2,
+ MOPEN_NO_MORE_MEMORY = 3,
+ MOPEN_INVALID_FILENAME = 4,
+ MOPEN_INVALID_STATUS = 5
+} mopenError;
+
+FILEIO_IMPEXP void C2F(mopen)(int *fd, char *file, char *status, int *f_swap, double *res, int *error);
+
+#endif /* __MOPEN_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/mput.h b/modules/fileio/includes/mput.h
new file mode 100755
index 000000000..a5c3567cb
--- /dev/null
+++ b/modules/fileio/includes/mput.h
@@ -0,0 +1,32 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __MPUT_H__
+#define __MPUT_H__
+
+#include <stdio.h>
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* mput functions write data in a machine
+* independant way (i.e write in little-endian)
+* or can be used to write in little or big endian
+*/
+FILEIO_IMPEXP void C2F(mput) (int *fd, double *res, int *n, char *type, int *ierr);
+
+FILEIO_IMPEXP void C2F(mputnc) (int *fd, void * res, int *n1, char *type, int *ierr);
+
+FILEIO_IMPEXP void mput2 (FILE *fa, int swap2, double *res, int n, char *type, int *ierr);
+
+#endif /* __MPUT_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/mseek.h b/modules/fileio/includes/mseek.h
new file mode 100755
index 000000000..59a9d9350
--- /dev/null
+++ b/modules/fileio/includes/mseek.h
@@ -0,0 +1,24 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __MSEEK_H__
+#define __MSEEK_H__
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* seek function
+*/
+FILEIO_IMPEXP void C2F(mseek) (int *fd, double *offset, const char *flag, int *err);
+
+#endif /* __MSEEK_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/mtell.h b/modules/fileio/includes/mtell.h
new file mode 100755
index 000000000..54d420c63
--- /dev/null
+++ b/modules/fileio/includes/mtell.h
@@ -0,0 +1,25 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __MTELL_H__
+#define __MTELL_H__
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+/**
+* tell function
+*/
+FILEIO_IMPEXP void C2F(mtell) (int *fd, double *offset, int *err);
+
+#endif /* __MTELL_H__ */
+/*--------------------------------------------------------------------------*/
+
diff --git a/modules/fileio/includes/readline.h b/modules/fileio/includes/readline.h
new file mode 100755
index 000000000..8b7bf3afa
--- /dev/null
+++ b/modules/fileio/includes/readline.h
@@ -0,0 +1,66 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006 - INRIA - Sylvestre LEDRU
+ * Copyright (C) DIGITEO - 2010 - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __READLINE_H__
+#define __READLINE_H__
+
+#include "dynlib_fileio.h"
+#include "machine.h"
+
+#define READNEXTLINE_ERROR_EOF_REACHED -1
+#define READNEXTLINE_ERROR_EOF_REACHED_AFTER_EOL 0
+#define READNEXTLINE_ERROR_EOL 1
+#define READNEXTLINE_ERROR_BUFFER_FULL 2
+#define READNEXTLINE_ERROR_EOF_REACHED_BEFORE_EOL 3
+#define READNEXTLINE_ERROR_ERROR_UNMANAGED 4
+
+/* PLEASE USE mgetl (see mgetl.h) and not these functions */
+/* only for compatibility with fortran code */
+
+/**
+* read a line from a text file
+* used by texmacs mode and readnextline
+* @param[in] fd: a int file descriptor to open
+* @param[in/out] buf : string buffer returned
+* @param[in] n : bsiz (4096)
+* @param[in/out]: *cnt numbers of returned characters
+* @param[in/out]: *nr numbers of returned characters
+* @return info code
+* -1 : EOF reached
+* 0 : EOF reached after an EOL
+* 1 : EOL reached
+* 2 : buffer full
+* 3 : EOF reached before any EOL
+* 4 : ERROR (not managed)
+*/
+FILEIO_IMPEXP int LineRead(int fd, char buf[], int n, int *cnt, int *nr);
+
+/**
+* read a line from a text file
+* used by exec to read a .sce file (see getlin.f)
+* @param[in] fd : a int file descriptor to open
+* @param[in/out] buf : string buffer returned
+* @param[in] *n : bsiz (4096)
+* @param[out] *count : numbers of returned characters + 1
+* @param[out] *nr : numbers of returned characters
+* @param[out] *ierr : int error code
+* -1 : EOF reached
+* 0 : EOF reached after an EOL
+* 1 : EOL reached
+* 2 : buffer full
+* 3 : EOF reached before any EOL
+* 4 : ERROR (not managed)
+*/
+FILEIO_IMPEXP void C2F(readnextline)(int *fd, char buf[], int *n, int *count, int *nr, int *ierr);
+
+#endif /* __READLINE_H__ */
diff --git a/modules/fileio/includes/removedir.h b/modules/fileio/includes/removedir.h
new file mode 100755
index 000000000..aa3140b30
--- /dev/null
+++ b/modules/fileio/includes/removedir.h
@@ -0,0 +1,35 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifndef __REMOVEDIR_H__
+#define __REMOVEDIR_H__
+
+#include <wchar.h>
+#include "dynlib_fileio.h"
+#include "BOOL.h" /* BOOL */
+
+/**
+* Remove a directory
+* @param path the directory
+* @return the result of the operation
+*/
+FILEIO_IMPEXP BOOL removedir(char *path);
+
+/**
+* Remove a directory
+* @param path the directory (wide string)
+* @return the result of the operation
+*/
+FILEIO_IMPEXP BOOL removedirW(wchar_t *pathW);
+
+#endif /* __REMOVEDIR_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/scicurdir.h b/modules/fileio/includes/scicurdir.h
new file mode 100755
index 000000000..8325e9368
--- /dev/null
+++ b/modules/fileio/includes/scicurdir.h
@@ -0,0 +1,48 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2007 - INRIA - Sylvestre LEDRU
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+#ifndef __SCICURDIR_H__
+#define __SCICURDIR_H__
+
+#include <wchar.h>
+#include "dynlib_fileio.h"
+
+/**
+ * Changes scilab current directory
+ * @param path : the path where Scilab should go
+ * @return err : the error code
+ */
+FILEIO_IMPEXP int scichdir(char *path);
+
+/**
+* Changes scilab current directory (wide string)
+* @param path : the path where Scilab should go
+* @return err : the error code
+*/
+FILEIO_IMPEXP int scichdirW(wchar_t *wcpath);
+
+/**
+ * Get scilab current directory
+ * @param[out] err : the error code
+ * @return path : the current path
+ */
+FILEIO_IMPEXP char * scigetcwd(int *err);
+
+/**
+* Get scilab current directory (wide string)
+* @param[out] err : the error code
+* @return path : the current path
+*/
+FILEIO_IMPEXP wchar_t * scigetcwdW(int *err);
+
+#endif /* __SCICURDIR_H__ */
+/*--------------------------------------------------------------------------*/
diff --git a/modules/fileio/includes/sendtorecyclebin.h b/modules/fileio/includes/sendtorecyclebin.h
new file mode 100755
index 000000000..b291e7801
--- /dev/null
+++ b/modules/fileio/includes/sendtorecyclebin.h
@@ -0,0 +1,22 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2011 - DIGITEO - Allan CORNET
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/
+#ifdef _MSC_VER
+#include "BOOL.h"
+#include "charEncoding.h"
+
+/* send a file to recycle bin on Windows */
+BOOL sendToRecycleBin(const char* filename);
+BOOL sendToRecycleBinW(const wchar_t* wfilename);
+
+#endif
+/*--------------------------------------------------------------------------*/ \ No newline at end of file
diff --git a/modules/fileio/includes/splitpath.h b/modules/fileio/includes/splitpath.h
new file mode 100755
index 000000000..59e6367a4
--- /dev/null
+++ b/modules/fileio/includes/splitpath.h
@@ -0,0 +1,45 @@
+/*--------------------------------------------------------------------------*/
+/*
+* ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2009 - Allan CORNET
+*
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution. The terms
+* are also available at
+* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+*
+*/
+/*--------------------------------------------------------------------------*/
+#ifndef __SPLIPATH_H__
+#define __SPLIPATH_H__
+
+#include <wchar.h>
+#include "BOOL.h"
+#include "dynlib_fileio.h"
+
+/**
+* Parts of file name and path
+* @param[in] filename or path
+* @param[in] BOOL expand filename
+* @param[out] drive
+* @param[out] directory
+* @param[out] filename
+* @param[out] file extension
+*/
+FILEIO_IMPEXP void splitpath(const char* path, BOOL bExpand, char* drv, char* dir, char* name, char* ext);
+
+/**
+* Parts of file name and path (Wide string)
+* @param[in] filename or path
+* @param[in] BOOL expand filename
+* @param[out] drive
+* @param[out] directory
+* @param[out] filename
+* @param[out] file extension
+*/
+
+FILEIO_IMPEXP void splitpathW(const wchar_t* path, BOOL bExpand, wchar_t* drv, wchar_t* dir, wchar_t* name, wchar_t* ext);
+
+#endif /* __SPLIPATH_H__ */
+/*--------------------------------------------------------------------------*/