Can anybody tell me how do I know whether a traget file is a
file or directory from the FileObject ??
I do not believe you can tell by examining the file object by itself.
However, you could query the file system for the information quite easily,
given the file object. See
Nt(Zw)QueryInformationFile and the FILE_STANDARD_INFORMATION struct.
-----Original Message-----
From: Sudhir_Sambrani [mailto:xxxxx@Satyam.com]
Sent: Tuesday, May 02, 2000 9:46 AM
To: File Systems Developers
Subject: [ntfsd] file or directory?
Can anybody tell me how do I know whether a traget file is a
file or directory from the FileObject ??
there’s the FILE_DIRECTORY_FILE and FILE_NON_DIRECTORY_FILE options in
create irps. the interesting thing is why have two options when it seems the
absence of one option implies the other…
Ho Mun Chuen
@@ “Not everything that counts can be counted;
<” )~ and not everything that can be counted counts"
//\ … Albert Einstein
----- Original Message -----
From: Smith, Joel
To: File Systems Developers
Sent: Tuesday, May 02, 2000 10:00 PM
Subject: [ntfsd] RE: file or directory?
I do not believe you can tell by examining the file object by itself.
However, you could query the file system for the information quite
easily, given the file object. See
Nt(Zw)QueryInformationFile and the FILE_STANDARD_INFORMATION struct.
-----Original Message-----
From: Sudhir_Sambrani [mailto:xxxxx@Satyam.com]
Sent: Tuesday, May 02, 2000 9:46 AM
To: File Systems Developers
Subject: [ntfsd] file or directory?
Can anybody tell me how do I know whether a traget file is a
file or directory from the FileObject ??
You’re wrong.
When you open a file you can specify only directory file can be opened (if
not directory error is returned) by FILE_DIRECTORY_FILE. If you specify
FILE_NON_DIRECTORY_FILE the opened file must be non-directory file
(ie. normal file or user volume open). If you do not specify any of this
flag
the file can be of any type (ie. file, directory or volume).
When you create the file the only method to create directory is to
specify FILE_DIRECTORY_FILE option.
Paul
-----P?vodn? zpr?va-----
Od: Ho Mun Chuen [SMTP:xxxxx@pmail.ntu.edu.sg]
Odesl?no: 4. kv?tna 2000 9:22
Komu: File Systems Developers
P?edm?t: [ntfsd] RE: file or directory?there’s the FILE_DIRECTORY_FILE and FILE_NON_DIRECTORY_FILE options in
create irps. the interesting thing is why have two options when it seems
the
absence of one option implies the other…Ho Mun Chuen
@@ “Not everything that counts can be counted;
<” )~ and not everything that can be counted counts"
//\ … Albert Einstein
----- Original Message -----
From: Smith, Joel
> To: File Systems Developers
> Sent: Tuesday, May 02, 2000 10:00 PM
> Subject: [ntfsd] RE: file or directory?
>
>
> I do not believe you can tell by examining the file object by itself.
> However, you could query the file system for the information quite
> easily, given the file object. See
> Nt(Zw)QueryInformationFile and the FILE_STANDARD_INFORMATION struct.
>
> -----Original Message-----
> From: Sudhir_Sambrani [mailto:xxxxx@Satyam.com]
> Sent: Tuesday, May 02, 2000 9:46 AM
> To: File Systems Developers
> Subject: [ntfsd] file or directory?
>
>
>
> Can anybody tell me how do I know whether a traget file is a
> file or directory from the FileObject ??
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@sodatsw.cz
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
file or directory?Try to send IRP_MN_QUERY_INFORMATION with
FileBasicInformation
class value. This will return FILE_BASIC_INFORMATION structure.
Check the FILE_ATTRIBUTE_DIRECTORY in FileAttributes field of it.
Max
----- Original Message -----
From: Sudhir_Sambrani
To: File Systems Developers
Sent: Tuesday, May 02, 2000 5:46 PM
Subject: [ntfsd] file or directory?
Can anybody tell me how do I know whether a traget file is a
file or directory from the FileObject ??
i see. thanks!
Ho Mun Chuen
@@ “Not everything that counts can be counted;
<” )~ and not everything that can be counted counts"
//\ … Albert Einstein
----- Original Message -----
From: Pavel Hrdina
To: File Systems Developers
Sent: Thursday, May 04, 2000 6:58 PM
Subject: [ntfsd] RE: file or directory?
You’re wrong.
When you open a file you can specify only directory file can be opened (if
not directory error is returned) by FILE_DIRECTORY_FILE. If you specify
FILE_NON_DIRECTORY_FILE the opened file must be non-directory file
(ie. normal file or user volume open). If you do not specify any of this
flag
the file can be of any type (ie. file, directory or volume).
When you create the file the only method to create directory is to
specify FILE_DIRECTORY_FILE option.
Paul
> -----P?vodn? zpr?va-----
> Od: Ho Mun Chuen [SMTP:xxxxx@pmail.ntu.edu.sg]
> Odesl?no: 4. kv?tna 2000 9:22
> Komu: File Systems Developers
> P?edm?t: [ntfsd] RE: file or directory?
>
> there’s the FILE_DIRECTORY_FILE and FILE_NON_DIRECTORY_FILE options in
> create irps. the interesting thing is why have two options when it seems
> the
> absence of one option implies the other…
>
> Ho Mun Chuen
> @@ “Not everything that counts can be counted;
> <” )~ and not everything that can be counted counts"
> //\ … Albert Einstein
> ----- Original Message -----
> From: Smith, Joel
> To: File Systems Developers
> Sent: Tuesday, May 02, 2000 10:00 PM
> Subject: [ntfsd] RE: file or directory?
>
>
> I do not believe you can tell by examining the file object by itself.
> However, you could query the file system for the information quite
> easily, given the file object. See
> Nt(Zw)QueryInformationFile and the FILE_STANDARD_INFORMATION struct.
>
> -----Original Message-----
> From: Sudhir_Sambrani [mailto:xxxxx@Satyam.com]
> Sent: Tuesday, May 02, 2000 9:46 AM
> To: File Systems Developers
> Subject: [ntfsd] file or directory?
>
>
>
> Can anybody tell me how do I know whether a traget file is a
> file or directory from the FileObject ??
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@sodatsw.cz
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
—
You are currently subscribed to ntfsd as: xxxxx@pmail.ntu.edu.sg
To unsubscribe send a blank email to $subst(‘Email.Unsub’)