Delete a Non-empty directory Programmatically

R

Raman

HI All,


Please help me understand, Is there any standard C -library function
available that can delete non-empty the directory tree.

Thanks and Regards,
Raman Chalotra
 
J

Joachim Schmitz

Raman said:
Please help me understand, Is there any standard C -library function
available that can delete non-empty the directory tree.
No. The C-Standard doesn't even know about directories. Asking in
comp.unixprogrammer might help, but AFAIX POSIX doesn't have such a library
function either.

Bye, Jojo
 
K

Keith Thompson

Raman said:
Please help me understand, Is there any standard C -library function
available that can delete non-empty the directory tree.

No. Standard C has no concept of directories. Your operating system
probably does; try a system-specific newsgroup.
 
S

santosh

Raman said:
HI All,


Please help me understand, Is there any standard C -library function
available that can delete non-empty the directory tree.

No. Standard C does not have any concept of directories. To do this you
need to look at extensions provided by your implementation or by your
system to read and traverse directories. If your platform is UNIX or
Linux post to <and if you are developing for
Windows one possible group is
<news:comp.os.ms-windows.programmer.win32>
 
K

Kenneth Brody

Joachim said:
No. The C-Standard doesn't even know about directories. Asking in
comp.unixprogrammer might help, but AFAIX POSIX doesn't have such a library
function either.

<OT>
My man pages state that the relevent functions are POSIX-compliant.
</OT>

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 
R

Raman

No. Standard C has no concept of directories. Your operating system
probably does; try a system-specific newsgroup.

--
Keith Thompson (The_Other_Keith) (e-mail address removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


Thanks for the reply.


Regards,
Raman Chalotra
 
J

Joachim Schmitz

Kenneth Brody said:
<OT>
My man pages state that the relevent functions are POSIX-compliant.
There is no POSIX funtion for that. There is a set of functions though, that
if combined properly might do what the OP needs (and he's be given these in
comp.unix.pogrammer), but he asked for _a function_, singular.

Bye, Jojo
 

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

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top