Hi All,
How to determine from the driver (similar to Sfilter), at IRP_MJ_CREATE ,
whether it is trying to open a file or a directory ??
Is there is any flags for that?
With Regards,
A.Ilamparithi.
Hi All,
How to determine from the driver (similar to Sfilter), at IRP_MJ_CREATE ,
whether it is trying to open a file or a directory ??
Is there is any flags for that?
With Regards,
A.Ilamparithi.
You need to look at fastfat or cdfs example, as well as get a copy of Rajeev
Nagar’s book on file systems.
The flag to check is in IrpSp->Parameters.Create.Options, and
FILE_DIRECTORY_FILE will be set if the caller is trying to open a directory.
“A.Ilamparithi” wrote in message news:xxxxx@ntfsd…
> Hi All,
>
> How to determine from the driver (similar to Sfilter), at IRP_MJ_CREATE ,
> whether it is trying to open a file or a directory ??
>
> Is there is any flags for that?
>
> With Regards,
> A.Ilamparithi.
>
>
>
This is not true.
This flag is only set if someone wants to make sure they are only
opening a directory. If this flag is not set and the
FILE_NON_DIRECTORY_FILE flag is not set, then you can be opening either
a directory or a file. The common case is that neither of these flags
are set.
To handle this you need to wait until the open successfully completes
and then issue a query information IRP for STANDARD information.
Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Greg Pearce
Sent: Tuesday, July 13, 2004 9:56 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Determine whether File is opened or a directory!
You need to look at fastfat or cdfs example, as well as get a copy of
Rajeev
Nagar’s book on file systems.
The flag to check is in IrpSp->Parameters.Create.Options, and
FILE_DIRECTORY_FILE will be set if the caller is trying to open a
directory.
“A.Ilamparithi” wrote in message
news:xxxxx@ntfsd…
> Hi All,
>
> How to determine from the driver (similar to Sfilter), at
IRP_MJ_CREATE ,
> whether it is trying to open a file or a directory ??
>
> Is there is any flags for that?
>
> With Regards,
> A.Ilamparithi.
>
>
>
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
> To handle this you need to wait until the open successfully completes
and then issue a query information IRP for STANDARD information.
You may add one optimization here - If one of the flags
(FILE_DIRECTORY_FILE or FILE_NON_DIRECTORY_FILE)
has been set when the create request came to your filter,
and the create request succeeded, you know what has been open)
L.
Here is another thought. If the IoStatus.Information is FILE_OVERWRITTEN
then are we sure the thing opened was in fact a file? What about
FILE_SUPERSEDED?
Cheers
Lyndon
“Ladislav Zezula” wrote in message news:xxxxx@ntfsd…
> > To handle this you need to wait until the open successfully completes
> > and then issue a query information IRP for STANDARD information.
>
> You may add one optimization here - If one of the flags
> (FILE_DIRECTORY_FILE or FILE_NON_DIRECTORY_FILE)
> has been set when the create request came to your filter,
> and the create request succeeded, you know what has been open)
>
> L.
>
>
Oops - sorry - I misunderstood the question. Thanks Neal ![]()
“A.Ilamparithi” wrote in message news:xxxxx@ntfsd…
> Hi All,
>
> How to determine from the driver (similar to Sfilter), at IRP_MJ_CREATE ,
> whether it is trying to open a file or a directory ??
>
> Is there is any flags for that?
>
> With Regards,
> A.Ilamparithi.
>
>
>