|
From: | Philip Nienhuis |
Subject: | Re: How to get file info from file handle |
Date: | Tue, 20 Mar 2012 22:35:42 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 |
Nicholas Jankowski wrote:
On Tue, Mar 20, 2012 at 3:34 PM, PhilipNienhuis<address@hidden> wrote:Is it possible to get some file info (e.g., file name) from a file handle returned by fopen?
assuming you did a fopen("all") or something that means you don't have the filename in the firstplace. If you do a fopen(fid) it will give you back info about the file. Otherwise, there's some stuff in the Octave user manual (octave.pdf) section on System Utilities / Filesystem Utilities. In particular I see fileattrib and stat. stat works of a 'file' or 'fid'. it only mentions a 'file' for fileattrib.
Thanks, I didn't spot that section (my bad). Unfortunately no way yet to recover the file name..... Philip
[Prev in Thread] | Current Thread | [Next in Thread] |