How check if a directory exists?

Hello,

i want know (in kernel mode ), how discover if a specific directory really exists ?

thank you.

Just issue a ZwCreateFile to the directory path using as desired access
FILE_READ_ATTRIBUTES and check out whatever the ZwCreateFile returns.
If it is an error like “STATUS_NOT_FOUND” then the directory does not exist.

Cheers,
Gabriel.
www.kasardia.com

On Thu, Jan 26, 2017 at 6:06 AM, wrote:

> Hello,
>
> i want know (in kernel mode ), how discover if a specific directory really
> exists ?
>
> thank you.
>
> —
> NTFSD is sponsored by OSR
>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
>


Bercea. G.</http:>

Try to open it. Or perform a directory enum on the parent if you already
have an FO for the parent.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295

------ Original Message ------
From: xxxxx@hotmail.com
To: “Windows File Systems Devs Interest List”
Sent: 1/25/2017 10:06:59 PM
Subject: [ntfsd] How check if a directory exists?

>Hello,
>
>i want know (in kernel mode ), how discover if a specific directory
>really exists ?
>
>thank you.
>
>—
>NTFSD is sponsored by OSR
>
>
>MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>software drivers!
>Details at http:
>
>To unsubscribe, visit the List Server section of OSR Online at
>http:</http:></http:>

You can try FltIsDirectory

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: jueves, 26 de enero de 2017 02:07 a.m.
To: Windows File Systems Devs Interest List
Subject: [ntfsd] How check if a directory exists?

Hello,

i want know (in kernel mode ), how discover if a specific directory really
exists ?

thank you.


NTFSD is sponsored by OSR

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at
http:</http:></http:>

You can try your luck using FltIsDirectory