Re: [Scilab-users] find name / path of open file
Federico Yes, I thought that would be easier. But still not as good as it could be, as it is difficult to use these function calls directly in expressions. This is the way I think it should be done in Scilab 6: function fp=fparts(fid) [a,b,fpne,d,e]=file(fid); [pathname,filename,extname]=fileparts(fpne); fp=list(fpne,pathname,filename,extname); endfunction fparts(fid)(1)// full path/filename.ext fparts(fid)(2)// path fparts(fid)(3)// filename fparts(fid)(4)// extension Jan On 2019-12-27 17:00 PM, Federico Miyara wrote: Jan, Oh, thanks! That's much better than dispfiles, since it gives the name as a variable. I had seen that function but somehow I didn't realize that possibility. Regards, Federico Miyara ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] find name / path of open file
Jan, Oh, thanks! That's much better than dispfiles, since it gives the name as a variable. I had seen that function but somehow I didn't realize that possibility. Regards, Federico Miyara On 27/12/2019 06:01, Jan Åge Langeland wrote: [u,t,pathandfilename]=file(fd) Jan On 2019-12-27 7:54 AM, Federico Miyara wrote: Dear All, How can I find the path and name of an open file from its file descriptor provided by mopen? Thanks, Federico Miyara ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] find name / path of open file
[u,t,pathandfilename]=file(fd) Jan On 2019-12-27 7:54 AM, Federico Miyara wrote: Dear All, How can I find the path and name of an open file from its file descriptor provided by mopen? Thanks, Federico Miyara ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] find name / path of open file
Sorry, it was easy. After searching for a while I finally found the function dispfiles(), which does the job... Federico Miyara On 27/12/2019 03:54, Federico Miyara wrote: Dear All, How can I find the path and name of an open file from its file descriptor provided by mopen? Thanks, Federico Miyara ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] find name / path of open file
Dear All, How can I find the path and name of an open file from its file descriptor provided by mopen? Thanks, Federico Miyara ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users