2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2011 - DIGITEO - Calixte DENIZET
4 * Copyright (C) 2015 - Scilab Enterprises - Antoine ELIAS
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
17 #include "ui_data_gw.hxx"
19 #include "function.hxx"
20 #include "FileBrowser.hxx"
25 #include "getScilabJavaVM.h"
26 #include "scicurdir.h"
28 /*--------------------------------------------------------------------------*/
29 using namespace org_scilab_modules_ui_data;
30 /*--------------------------------------------------------------------------*/
31 static const std::string fname("filebrowser");
32 /*--------------------------------------------------------------------------*/
33 types::Function::ReturnValue sci_filebrowser(types::typed_list &in, int _iRetCount, types::typed_list &out)
40 Scierror(999, _("%s: Wrong number of input arguments: %d expected.\n"), fname.data(), 0);
41 return types::Function::Error;
46 Scierror(999, _("%s: Wrong number of output arguments: %d expected.\n"), fname.data(), 1);
47 return types::Function::Error;
50 FileBrowser::openFileBrowser(getScilabJavaVM());
52 cwd = scigetcwd(&err);
55 FileBrowser::setBaseDir(getScilabJavaVM(), cwd);
58 return types::Function::OK;