Re: Removing all files inside a directory in Linux using an API call from a C Code
- From: Aditya <adityagupta.18@xxxxxxxxx>
- Date: 30 Oct 2007 10:44:41 -0700
On Oct 29, 10:22 pm, "Joachim Schmitz" <nospam.j...@schmitz-
digital.de> wrote:
"santosh" <santosh....@xxxxxxxxx> schrieb im Newsbeitragnews:fg4j30$gu$1@xxxxxxxxxxx> Aditya wrote:
On Oct 29, 2:18 pm, santosh <santosh....@xxxxxxxxx> wrote:
I also don't want to use system call,
What you want to do is inherently impossible to do without system calls,
unless you don't mind writing a kernel module.
system call vs. calling system()
Guess he meant the later
Bye, Jojo
Thanks Jojo
and thanks Santosh
I read both of you. I have already tried this and I actually don't
know what the dirent->d_name structure contains. It has the complete
listing of the files inside a directory, all padded with junk
data(most of them being NULL). First is how to extract the filenames
from this. Second the dirent->d_type always returns DT_DIR(==4),
irrespective of a subfolder existence. I am stuck here. I am also
unable to find a good tutorial on this. Please help out again.
bye
Aditya
.
- Follow-Ups:
- References:
- Removing all files inside a directory in Linux using an API call from a C Code
- From: Aditya
- Re: Removing all files inside a directory in Linux using an API call from a C Code
- From: Joachim Schmitz
- Re: Removing all files inside a directory in Linux using an API call from a C Code
- From: santosh
- Re: Removing all files inside a directory in Linux using an API call from a C Code
- From: Aditya
- Re: Removing all files inside a directory in Linux using an API call from a C Code
- From: santosh
- Re: Removing all files inside a directory in Linux using an API call from a C Code
- From: Joachim Schmitz
- Removing all files inside a directory in Linux using an API call from a C Code
- Prev by Date: Re: Reclaiming locks
- Next by Date: Re: newbie question about fork/pipe/stdin/stdout
- Previous by thread: Re: Removing all files inside a directory in Linux using an API call from a C Code
- Next by thread: Re: Removing all files inside a directory in Linux using an API call from a C Code
- Index(es):