|
How to manipulate directories ? |
LordHolNapul
Member #3,619
June 2003
|
Hi everyone, Wich is the include .h to use ? Can you post to me some examples ? Thank you. ciao:P |
Tobias Dammers
Member #2,604
August 2002
|
You can do this with allegro routines, or use the libc equivalents. Remember that a directory is basically a file with the directory flag set (only you cannot read from it or write to it). --- |
Michael Faerber
Member #4,800
July 2004
|
My code for those tasks:
-- |
LordHolNapul
Member #3,619
June 2003
|
Thank you, in this case I haven't Allegro opened and I want to manage directories.. So you say that the library to manage this is "#include <sys/stat.h>" . I hope this is a standard library and I'll try later.... ciao |
Tobias Dammers
Member #2,604
August 2002
|
It's not a lib, but a header. But anyway, libc (which either (windows) links statically or (linux) can be assumed to be on the target system) should have appropriate calls too. Otherwise you might want to use the respective platform's native file system api. --- |
ReyBrujo
Moderator
January 2001
|
Not ANSI, but POSIX: -- |
LordHolNapul
Member #3,619
June 2003
|
I've found that you don't understood my problem... but you put me to the right way... I've found only this old document that specify a maximum dir lenght of 64 bytes included \0, but it's not true. I've tried the code with 200 byte directory and it works fine... here the link if you are interested : http://www.digitalmars.com/rtl/direct.html#_chdir see you next time! We will speak of Open Layer |
|