Hi,
How can I delete directories those have subdirs or files?
I tried disposition information and FILE_DELETE_ON_CLOSE to do this job.
When I tried this job with my File System Filter Driver, I got STATUS_DELETE_PENDING as a return value.
It looks like there must be some NOTIFY_CHAGE to update vpb or ccb etc.
ZwNotifyChangeDirectory looks like not exported, which I used to give the system notify.
Do you guys know what system function can do this job or how can I delete directories that have subdirs?
Any answer will be appreciated.
Thanks
Jaehong Ahn
Enumerate and delete the contents first. You cannot delete non-empty directories, since you would effectively be orphaning their contents.
-----Original Message-----
From: xxxxx@jungsoft.com [mailto:xxxxx@jungsoft.com]
Sent: Monday, June 16, 2003 2:19 AM
To: File Systems Developers
Subject: [ntfsd] How can I delete directories those have subdirs or files?
Hi,
How can I delete directories those have subdirs or files?
I tried disposition information and FILE_DELETE_ON_CLOSE to do this job.
When I tried this job with my File System Filter Driver, I got STATUS_DELETE_PENDING as a return value.
It looks like there must be some NOTIFY_CHAGE to update vpb or ccb etc.
ZwNotifyChangeDirectory looks like not exported, which I used to give the system notify.
Do you guys know what system function can do this job or how can I delete directories that have subdirs?
Any answer will be appreciated.
Thanks
Jaehong Ahn
b???v?jj??r???&ޱ??i?Z?G?j)m?W???~???±??+
Thanks for your reply,
I did delete all the contents in the target directory, and I got the end of file is 0 byte when I called ZwQueryInformationFile - FastIo function was detected by FileMON.
But the dir is still not empty - maybe the contents exist on cache or somewhere.
It looks like that the NotifyChangeDirectory is needed because I saw the lazy write on the target directory.
Do you know how to do NotifyChangeDirectory with FS Filter Driver?
Or any solution to delete directory that has some sub-dirs?
Any reply or help will be appreciated.
Jaehong Ahn
----- Original Message -----
From: Tom Hansen
To: File Systems Developers
Sent: Monday, June 16, 2003 11:42 PM
Subject: [ntfsd] RE: How can I delete directories those have subdirs or files?
Enumerate and delete the contents first. You cannot delete non-empty directories, since you would effectively be orphaning their contents.
-----Original Message-----
From: xxxxx@jungsoft.com [mailto:xxxxx@jungsoft.com]
Sent: Monday, June 16, 2003 2:19 AM
To: File Systems Developers
Subject: [ntfsd] How can I delete directories those have subdirs or files?
Hi,
How can I delete directories those have subdirs or files?
I tried disposition information and FILE_DELETE_ON_CLOSE to do this job.
When I tried this job with my File System Filter Driver, I got STATUS_DELETE_PENDING as a return value.
It looks like there must be some NOTIFY_CHAGE to update vpb or ccb etc.
ZwNotifyChangeDirectory looks like not exported, which I used to give the system notify.
Do you guys know what system function can do this job or how can I delete directories that have subdirs?
Any answer will be appreciated.
Thanks
Jaehong Ahn
You are currently subscribed to ntfsd as: xxxxx@jungsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com b???v?jj??r???&ޱ??i?Z?G?j)m?W???~???±??+
>I did delete all the contents in the target directory, and I got the end of
file is 0 byte when I called ZwQueryInformationFile - FastIo function was
detected by FileMON.
ZwQueryInformationFile always reports 0 length for directories.
But the dir is still not empty - maybe the contents exist on cache or
somewhere.
Information in cache is irrelevant, directory is empty when all files were
deleted and closed.
Alexei.