ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <stev...@iseran.com>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/util FileUtils.java
Date Tue, 20 Apr 2004 15:47:55 GMT
Matt Benson wrote:
> --- stevel@apache.org wrote:
> 
>>  +    /**
>>  +     * get the granularity of file timestamps.
>>  +     * The choice is made on OS, which is
>>incorrect -it should really be
>>  +     * by filesystem. We do not have an easy way
>>to probe for file systems,
>>  +     * however.
> 
> 
> Funny you should mention that, Steve... I was screwing
> around with this concept for Windows... NTFS seems to
> have a granularity of < 0ms, which I wanted to account
> for... Seems that NT, 2k, and XP have an executable in
> their normal path called CHKNTFS.EXE, which can detect
> the NTFS filesystem on local drives.  Not perfect, but
> maybe a start... I thought about creating a static
> HashSet of NTFS File roots (drives) in FileUtils when
> Os.isFamily("windows"), but I was unable to decide how
> to behave, for example, when <copy>ing files from a
> known NTFS filesystem to another, and vice-versa....
> any thoughts?
> 

You can probe for NTFS by creating a file with a stream. e.g

foo.txt:1

WinXP uses streams to store metadata about things (music, photos), and 
whines when you copy them to FAT32. I know, I moved mine to fat32 to be 
acccesible on a multiboot system.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message