How can I get the folder OBject by file object?

Hi,
I am working a file system filter drive by modifying from sfilter of IFS kit. When I get a file object at IRP_MJ_READ, IRP_MJ_WRITE and IRP_MJ_CREATE, is there any way I can get its folder object? For instance, I get file object of the “c:\folder\file.ext”, can I get the object of “c:\folder”. Thank advance for any opinion.

Xj Fu