Given a file pointer is there any way to get the fill path to thefile

I

Ian Collins

I tried unistd.h
but nothing much

Tried what? Ah, I see you hid your question in the subject line.

This topic has been done to death here several times, check the archives.
 
K

Keith Thompson

I tried unistd.h
but nothing much

Please put the question:

Given a file pointer is there any way to get the fill path to the
file

in the body of your message.

There is no way in standard C to do this, unless you remember the file
name when you open it. The reference to unistd.h implies that you're
using a Unix-like system; I don't believe there's any direct way to do
this under Unix either, but if there is you'll get better answers in
comp.unix.programmer (check their FAQ(s) first).
 
V

vippstar

The reference to unistd.h implies that you're
using a Unix-like system; I don't believe there's any direct way to do
this under Unix either, but if there is you'll get better answers in
comp.unix.programmer (check their FAQ(s) first).

I've asked before, they don't have one :-(
It'd be helpful.
 
L

lawrence.jones

I tried unistd.h
but nothing much

It would be helpful if you actually stated your question (how to get a
file name from a file pointer) in the text rather than just in the
subject.

On many systems, there is no unique mapping between file names and
files; there can be zero, one, or many names for a file. There is no
function either in standard C or in Posix to do that.
 
P

parag_paul

I've asked before, they don't have one :-(
It'd be helpful.

A small question ,
where can I find the archives and is there a direct search to the same
 
K

Keith Thompson

A small question ,
where can I find the archives and is there a direct search to the same

Um, which archives? groups.google.com archives most Usenet posts.
www.faqs.org archives frequently asked questions list, though not in a
particularly reader-friendly format. I found the Unix FAQ by a simple
Google search for "Unix FAQ".
 
F

Flash Gordon

A small question ,
where can I find the archives and is there a direct search to the same

Google Groups, through which you are posting, acts as an archive and
allows you to search! There are, I believe, other places that also
archive some groups. However, News Groups are not a centralised thing so
there is no one definitive archive (although Google tries to be one).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top