Hi Phil.
I spent ages some years back trying to sort out something very similar.
I can't entirely remember the details, but Fat, Fat32 and NTFS store
datetime information differently from each other.(Others may know the exact
details). Primarily I believe the difference between these windows formats
is whether or not the locale / regional settings are applied. From memory
NTFS stores according to GMT while FAT systems store according to regional
settings. For example, try looking at a files creation date and time, and
then turn on daylight savings settings and watch the date and time change,
so frustrating if you are trying to synchronise files as we were. Windows
automatically alters the date/time and all of a sudden your date time is
out.
There is a call to tell you the operating system of a volume, but there are
some difficulties, for exmaple:
Machine 1 (FAT) accessing file on Machine 1 (FAT)
Machine 1 (FAT) accessing file on Machine 2 (NTFS)
Machine 2 (NTFS) accessing file on Machine 2 (NTFS)
could all produce different values.
If you want I can dig out some code for you that is supposed to strip off
the locale information on those FAT volumes but the problem is when you
access from Machine 1 to Machine 2, you don't know what locale information
is being applied on the second machine. So you can never really cover all
bases.
Depending on what you are attempting to do if you have control of all the
files that go in there in the first place, you may want to consider
embedding datetime information into the filename or some index database
alongside it.
Other people might have some better solutions.
Matt.
----- Original Message -----
From: "Phil Middlemiss" <[EMAIL PROTECTED]>
To: "NZ Borland Developers Group - Delphi List" <[email protected]>
Sent: Wednesday, July 20, 2005 2:26 PM
Subject: Re: [DUG] determining file system
Hmmm, not quite what I need. I'll keep looking. Cheers,
Phil.
Rohit Gupta wrote:
I seem to recall some api that would give you this info. However, the
nearest I can find is GetVolumeInformation. I know there is something
else, but I cant find it. :-)
Date sent: Wed, 20 Jul 2005 11:08:14 +1200
From: Phil Middlemiss <[EMAIL PROTECTED]>
Organization: MTS Ltd
To: NZ Borland Developers Group - Delphi List
<[email protected]>
Subject: [DUG] determining file system
Send reply to: NZ Borland Developers Group - Delphi List
<[email protected]>
<mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>
[ Double-click this line for list subscription options ]
Part of our code depends on getting the file stamp of a particular file,
however on systems that have that particular file served by something like
Novell Netware, that timestamp can be something other than what was
expected.
Is there a way to determine the file/operating/network system (whatever is
the correct one to check) of a given location?
Cheers,
Phil.
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
Regards
Rohit
======================================================================
CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand
PH (649) 489-2280 FX (649) 489-2290
email [EMAIL PROTECTED] or [EMAIL PROTECTED]
======================================================================
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.9.2/52 - Release Date: 19/07/2005
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi