On 10/23/2009 10:34 AM, Aditya Bhagwat wrote:
> [fid,msg] = tmpfile()
> fprintf(fid, "hello");
>
> Is there any way of finding out the name of the file to which "hello"
> has been written? I do know the file identifier (stored in fid), but
> don't know the file name.
If you want the name, use tmpname() and fopen(), for instance like this:
fopen(fname=tmpnam(),'w')
By the way, on Linux you can tease out the name of a file by the file
descriptor number:
system(['ls -l /proc/$$/fd/' num2str(fid)])
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave