Hi
1)I have a windows 98 file system filter driver. I sometimes get in the
hook routine the full file name, and sometimes I get the 8.3 file name. How
can I make sure that the file name I have is the full name and not the 8.3
short file name version?
2)When do I get called with IFSFN_OPEN, and when do I get called with
IFSFN_FINDOPEN and what is IFSFN_DIR for?
Thanks
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
This is probably the wrong list for this, but anyway
1)I have a windows 98 file system filter driver. I sometimes get in the
hook routine the full file name, and sometimes I get the 8.3 file name. How
can I make sure that the file name I have is the full name and not the 8.3
short file name version?
You should probably ask the FS driver to convert it for you. See the
documentation for the FS_Dir function (which equates to the IFSFN_DIR
function in the hook). It has options for QUERY83_DIR and QUERYLONG_DIR
which can convert one form to the other.
2)When do I get called with IFSFN_OPEN, and when do I get called with
IFSFN_FINDOPEN and what is IFSFN_DIR for?
IFSFN_OPEN is called to open a file for read/write access (see the
FS_OpenFile function). The IFSFN_FINDOPEN is used to open a directory
search handle (see FS_FindFirstFile). The IFSFN_DIR function is used to
perform operations on a directory i.e. Create dir, delete dir, check
dir, query 8.3 and query long name (see the FS_Dir function).
Shaun
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Hi,
How can I tell if the name in the hook function is long name or the 8.3
version?
Ronen
From: Shaun
>Reply-To: “File Systems Developers”
>To: “File Systems Developers”
>Subject: [ntfsd] Re: IFSMgr - getting file name
>Date: Tue, 7 Aug 2001 21:06:39 +0100
>
>This is probably the wrong list for this, but anyway
>
> >1)I have a windows 98 file system filter driver. I sometimes get in the
> >hook routine the full file name, and sometimes I get the 8.3 file name.
>How
> >can I make sure that the file name I have is the full name and not the
>8.3
> >short file name version?
>
>You should probably ask the FS driver to convert it for you. See the
>documentation for the FS_Dir function (which equates to the IFSFN_DIR
>function in the hook). It has options for QUERY83_DIR and QUERYLONG_DIR
>which can convert one form to the other.
>
> >2)When do I get called with IFSFN_OPEN, and when do I get called with
> >IFSFN_FINDOPEN and what is IFSFN_DIR for?
> >
>
>IFSFN_OPEN is called to open a file for read/write access (see the
>FS_OpenFile function). The IFSFN_FINDOPEN is used to open a directory
>search handle (see FS_FindFirstFile). The IFSFN_DIR function is used to
>perform operations on a directory i.e. Create dir, delete dir, check
>dir, query 8.3 and query long name (see the FS_Dir function).
>
>Shaun
>
>—
>You are currently subscribed to ntfsd as: xxxxx@hotmail.com
>To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
—
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
We had a similar problem. What I did was to convert all the names I got to
the long version. If it was already the long version, I still got the long
version back (but I don’t recall how that happened – maybe I caught the
FALSE return value and fell out of the routine.)
Sorry I don’t have the code handy…
Phil
----- Original Message -----
From: “Ronen Agam”
To: “File Systems Developers”
Sent: Wednesday, August 08, 2001 10:37 AM
Subject: [ntfsd] Re: IFSMgr - getting file name
> Hi,
> How can I tell if the name in the hook function is long name or the 8.3
> version?
>
> Ronen
>
>
> >From: Shaun
> >Reply-To: “File Systems Developers”
> >To: “File Systems Developers”
> >Subject: [ntfsd] Re: IFSMgr - getting file name
> >Date: Tue, 7 Aug 2001 21:06:39 +0100
> >
> >This is probably the wrong list for this, but anyway
> >
> > >1)I have a windows 98 file system filter driver. I sometimes get in the
> > >hook routine the full file name, and sometimes I get the 8.3 file name.
> >How
> > >can I make sure that the file name I have is the full name and not the
> >8.3
> > >short file name version?
> >
> >You should probably ask the FS driver to convert it for you. See the
> >documentation for the FS_Dir function (which equates to the IFSFN_DIR
> >function in the hook). It has options for QUERY83_DIR and QUERYLONG_DIR
> >which can convert one form to the other.
> >
> > >2)When do I get called with IFSFN_OPEN, and when do I get called with
> > >IFSFN_FINDOPEN and what is IFSFN_DIR for?
> > >
> >
> >IFSFN_OPEN is called to open a file for read/write access (see the
> >FS_OpenFile function). The IFSFN_FINDOPEN is used to open a directory
> >search handle (see FS_FindFirstFile). The IFSFN_DIR function is used to
> >perform operations on a directory i.e. Create dir, delete dir, check
> >dir, query 8.3 and query long name (see the FS_Dir function).
> >
> >Shaun
> >
> >—
> >You are currently subscribed to ntfsd as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@phord.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
—
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
I don’t think you can tell. But if you call the function to convert
to (for example) long file names, if it is already the long filename
it will simply not be changed.
Shaun
Ronen Agam wrote:
>Hi,
>How can I tell if the name in the hook function is long name or the 8.3
>version?
>
>Ronen
>
>
>>From: Shaun
>>Reply-To: “File Systems Developers”
>>To: “File Systems Developers”
>>Subject: [ntfsd] Re: IFSMgr - getting file name
>>Date: Tue, 7 Aug 2001 21:06:39 +0100
>>
>>This is probably the wrong list for this, but anyway
>>
>> >1)I have a windows 98 file system filter driver. I sometimes get in the
>> >hook routine the full file name, and sometimes I get the 8.3 file name.
>>How
>> >can I make sure that the file name I have is the full name and not the
>>8.3
>> >short file name version?
>>
>>You should probably ask the FS driver to convert it for you. See the
>>documentation for the FS_Dir function (which equates to the IFSFN_DIR
>>function in the hook). It has options for QUERY83_DIR and QUERYLONG_DIR
>>which can convert one form to the other.
>>
>> >2)When do I get called with IFSFN_OPEN, and when do I get called with
>> >IFSFN_FINDOPEN and what is IFSFN_DIR for?
>> >
>>
>>IFSFN_OPEN is called to open a file for read/write access (see the
>>FS_OpenFile function). The IFSFN_FINDOPEN is used to open a directory
>>search handle (see FS_FindFirstFile). The IFSFN_DIR function is used to
>>perform operations on a directory i.e. Create dir, delete dir, check
>>dir, query 8.3 and query long name (see the FS_Dir function).
>>
>>Shaun
>>
—
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
On Wed, 8 Aug 2001 14:47:00 -0400, you wrote:
We had a similar problem. What I did was to convert all the names I got to
the long version. If it was already the long version, I still got the long
version back (but I don’t recall how that happened – maybe I caught the
FALSE return value and fell out of the routine.)
Asking the FSD to convert the name to long form involves a directory
lookup. If the name in question does not include a “~” followed by
a numeric suffix then in cannot possible be a short name. Which is
to say, it must be a long name.
/john
John Yates
40 Pine Street
Needham, MA 02492
781 444-2899
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Given that this thread started in the context of Windows 9x, it is
definitely not true that the lack of a “~” form implies it must be a
long name. Create a mixed case but otherwise 8.3 legal name and you’ll
see it creates an LFN to preserve case and an upcased short name.
This is one of the areas where the 9x and NT/XP algorithms disagree.
… and the “~” is only universal to MS filesystems. UDF
(http://www.udf.org) is an example which madates # as the uniquifier
seperation.
-----Original Message-----
From: John S. Yates, Jr [mailto:xxxxx@yates-sheets.org]
Sent: Thursday, August 09, 2001 8:12 AM
To: File Systems Developers
Subject: [ntfsd] Re: IFSMgr - getting file name
On Wed, 8 Aug 2001 14:47:00 -0400, you wrote:
We had a similar problem. What I did was to convert all the names I
got to
the long version. If it was already the long version, I still got the
long
version back (but I don’t recall how that happened – maybe I caught
the
FALSE return value and fell out of the routine.)
Asking the FSD to convert the name to long form involves a directory
lookup. If the name in question does not include a “~” followed by
a numeric suffix then in cannot possible be a short name. Which is
to say, it must be a long name.
/john
John Yates
40 Pine Street
Needham, MA 02492
781 444-2899
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Sorry, I mangled that.
John’s statement was that “~NNN” is not present in a file, it cannot be
a “short” name. A short name means that there is also a long name since
the name the user specified is not 8.3 legal. This is where FAT will
spin up an 8.3 name to serve as the short name and record the original
name as the long name.
Win9x records a name such as AaAaA.TXT in the following form:
SFN: AAAAA.TXT
LFN: AaAaA.TXT
which is the counterexample. You can see this in the physical dirents on
9x if you pop open a disk/hex editor.
The NT codeline will actually do the same thing if it can get away with
it.
Where the codelines do disagree is if the name or extension are
individually monocased (upper or lower). NT uses a couple spare bits in
the dirent (this is the NT byte) to indicate that the case preserved
name is different from what is in the dirent itself. It’s a cheap
optimization. So you’d see on NT:
SFN to user: foo.TXT
SFN on disk: FOO.TXT (bits indicating that the name is really lowercase)
LFN:
9x:
SFN: FOO.TXT
LFN: foo.TXT
Hope that clears it up.
-----Original Message-----
From: Daniel Lovinger
Sent: Thursday, August 09, 2001 3:52 PM
To: File Systems Developers
Subject: [ntfsd] Re: IFSMgr - getting file name
Given that this thread started in the context of Windows 9x, it is
definitely not true that the lack of a “~” form implies it must be a
long name. Create a mixed case but otherwise 8.3 legal name and you’ll
see it creates an LFN to preserve case and an upcased short name.
This is one of the areas where the 9x and NT/XP algorithms disagree.
… and the “~” is only universal to MS filesystems. UDF
(http://www.udf.org) is an example which madates # as the uniquifier
seperation.
-----Original Message-----
From: John S. Yates, Jr [mailto:xxxxx@yates-sheets.org]
Sent: Thursday, August 09, 2001 8:12 AM
To: File Systems Developers
Subject: [ntfsd] Re: IFSMgr - getting file name
On Wed, 8 Aug 2001 14:47:00 -0400, you wrote:
>We had a similar problem. What I did was to convert all the names I
got to
>the long version. If it was already the long version, I still got the
long
>version back (but I don’t recall how that happened – maybe I caught
the
>FALSE return value and fell out of the routine.)
Asking the FSD to convert the name to long form involves a directory
lookup. If the name in question does not include a “~” followed by
a numeric suffix then in cannot possible be a short name. Which is
to say, it must be a long name.
/john
–
John Yates
40 Pine Street
Needham, MA 02492
781 444-2899
—
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
On Thu, 9 Aug 2001 15:51:42 -0700, Daniel Lovinger wrote:
Given that this thread started in the context of Windows 9x, it is
definitely not true that the lack of a “~” form implies it must be a
long name. Create a mixed case but otherwise 8.3 legal name and you’ll
see it creates an LFN to preserve case and an upcased short name.
This is one of the areas where the 9x and NT/XP algorithms disagree.
… and the “~” is only universal to MS filesystems. UDF
(http://www.udf.org) is an example which madates # as the uniquifier
seperation.
What a great mailing list: authoritative help even when ostensibly
off topic!
I am writing from a vacation home on a dial-up line away from any
reference material. I should have kept my mouth shut as I am not
in a position to go back and check my code or reference materials.
The point I was making remains: under many circumstances a syntactic
check will tell you if the name is already an LFN, thereby allowing
you to avoid a directory lookup. IIRC in the w9x environment there
is an attribute bit that is supplied in the ioreq (and maybe also by
some of the name conversion functions?) that says the name is only
valid under the LFN rule. So I didn’t actually do any parsing to
implement the optimization.
And since it was mentioned, what exactly is the divergence in this
area between w9x and NT/XP?
/john
John Yates
40 Pine Street
Needham, MA 02492
781 444-2899
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com