This is actually an excellent group for support. There are many people with
varied experiences and most are very willing to share those experiences.
However, I know that most of us do not appreciate it when people come and
ask questions for which we’ve built up a storehouse of knowledge (the
archives of this list). Speaking for myself, this is because it indicates a
lack of respect for our time and expertise. It is one thing to come asking
a complex question for which the answer is not readily apparent, and it is
another to come and ask a fundamental question that is available in the
history of this group, within the FAQ, or within the IFS Kit documentation.
I know that I have answered this question numerous times over the years.
For the sake of courtesy, I will answer it once again, but I shall refrain
from answering additional questions when the answer is easily available and
the questioner has not even had the courtesy to attempt to find it before
asking.
A file or directory is deleted when a deletion request is pending and the
last user reference to the file is released (that is, the last
IRP_MJ_CLEANUP is sent to the file system).
Deletion is requested on a file or directory in one of two ways:
-
When the file/directory is opened, FILE_DELETE_ON_CLOSE is set. The exact
semantics of this are complicated because the file systems explicitly check
for this, explicitly add DELETE access to the access required (even if not
requested originally) and must deal with issues regarding directories (a
directory must be empty before it can be marked delete pending).
-
For an already opened file/directory, the IRP_MJ_SET_INFORMATION,
specifying FileDispositionInformation and then providing the
FILE_DISPOSITION_INFORMATION structure indicating TRUE for the DeleteFile
field.
In these cases the file is now scheduled for deletion, but that can be
changed by a subsequent call to modify the file disposition (indicating
FALSE for the DeleteFile field.)
Note that the EXACT semantics are file system specific. Do not be surprised
if you see some differences in the seven general purpose file systems
currently available from Microsoft. For example, CDFS and UDFS currently do
not allow you to delete files (note the term “currently” - were Microsoft to
provide a read/write UDF file system, then I suspect these semantics would
change.) NFS semantics are very different than CIFS semantics for deletion,
and I must admit I am not certain about the semantics of the Netware
redirector’s file deletion semantics.
In order to assist in the future, I have placed this write up on the OSR
Online site.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: vishal [mailto:xxxxx@yahoo.co.in]
Sent: Friday, June 20, 2003 12:47 PM
To: File Systems Developers
Subject: [ntfsd] Hi I got no response from here.
Hi to all
I guess my doubt i posted here couple of days back was missed by
all(specially LALIT)
I repeat my problem again
1 How to trap file or folder delete and figure out if file or folder has
been requested for deletion (is there any differnce in handling of file or
folder deletion)?
2 Instead of deleting file/folder i need to hide them.User is not be
given any message of NO_ACCESS. The user has the illusion that the file or
folder is deleted and is recovered on reboot.(is there any differnce in
handling of file or folder hiding)? HOW TO HIDE FILE/FOLDER ??
Any tip with a sample code will be a great help to me as i am new to this
subject and i have do this job ASAP.
thanks
Vishal
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com