Re: [Scilab-users] find name / path of open file

2019-12-27 Thread Jan Åge Langeland

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

2019-12-27 Thread Federico Miyara


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

2019-12-27 Thread Jan Åge Langeland

[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

2019-12-26 Thread Federico Miyara


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

2019-12-26 Thread Federico Miyara


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