ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: Touch task
Date Tue, 27 Jun 2000 12:56:40 GMT
> From: Stefan Bodewig [mailto:bodewig@bost.de]
> Sent: Tuesday, 27 June 2000 21:40
> To: ant-dev@jakarta.apache.org
> Subject: Touch task
>
>
> Hi,
>
> Some of you might have noticed my hack to Untar to set the file
> modification times to the values retrieved from the tar file. I'd like
> to do the same to the Expand task. As I don't want to duplicate code
> I'm going to move the relevant parts out into another class which
> could easily be a Touch task.
>
> The problem I see is that this task wouldn't do anything in JDK 1.1 as
> File.setLastModified hasn't been there and write(new byte[0]) doesn't
> change the modification time of the file you are writing to - at least
> not on my Linux box.
>
> So my question is whether we want to have a touch task that would be a
> NOP on JDK 1.1 - except when the file that shall be touched doesn't
> exist.
>

I think a NOP would be misleading. I would prefer to see it blowup.
Something like
"touch is not supported under Java 1.1". No surprises then (look how many
times the
modern compile thing has caught people out).

Conor


Mime
View raw message