K
kvnsmnsn
I've written a piece of code that interfaces with Postgres. It needs
to write a Postgres table to disk, which it does with the <COPY> com-
mand. That command requires the absolute file name of the file being
written to. Right now I've got it hard coded to the exact location
where I want it, but that's not very portable. Is there some way in C
to retrieve the absolute path name of the current directory, so that I
could use that in my code and therefore have my code function right no
matter where it's executed? Any information on this would be greatly
appreciated.
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
to write a Postgres table to disk, which it does with the <COPY> com-
mand. That command requires the absolute file name of the file being
written to. Right now I've got it hard coded to the exact location
where I want it, but that's not very portable. Is there some way in C
to retrieve the absolute path name of the current directory, so that I
could use that in my code and therefore have my code function right no
matter where it's executed? Any information on this would be greatly
appreciated.
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_