1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Copyright (C) INRIA 3// 4// Copyright (C) 2012 - 2016 - Scilab Enterprises 5// 6// This file is hereby licensed under the terms of the GNU GPL v2.0, 7// pursuant to article 5.3.4 of the CeCILL v.2.1. 8// This file was originally licensed under the terms of the CeCILL v2.1, 9// and continues to be available under such terms. 10// For more information, see the COPYING file which you should have received 11// along with this program. 12 13function path = get_file_path(name) 14 //------------------------------- 15 // returns loader full path 16 path ="./"; 17 [units,typs,nams]=file(); 18 clear units typs 19 for k=size(nams,"*"):-1:1 20 l=strindex(nams(k),name); 21 if l<>[] then 22 path=part(nams(k),1:l($)-1); 23 break 24 end 25 end 26 if path == "" then path = pwd() ; end 27endfunction 28