Re: [Pharo-users] overriding FileReference>>copyTo: behavior

2018-09-17 Thread Sven Van Caekenberghe
target exists ifFalse: [ source copyTo: target ]

?

> On 17 Sep 2018, at 13:27, Peter Uhnak  wrote:
> 
> Ideally something that works as updater only (doesn't touch nor change 
> modification time if the contents is the same)
> 
> On Mon, Sep 17, 2018 at 1:16 PM Peter Uhnak  wrote:
> Hi,
> 
> is there an API to copy a file that will override the target destination if 
> it already exists? I was quite surprised that #copyTo: (and #copyAllTo:) will 
> throw up when the target file already exists.
> 
> Do I need to explicitly remove the file before copying / copy the contents 
> instead?
> 
> Thanks,
> Peter




Re: [Pharo-users] overriding FileReference>>copyTo: behavior

2018-09-17 Thread Peter Uhnak
Ideally something that works as updater only (doesn't touch nor change
modification time if the contents is the same)

On Mon, Sep 17, 2018 at 1:16 PM Peter Uhnak  wrote:

> Hi,
>
> is there an API to copy a file that will override the target destination
> if it already exists? I was quite surprised that #copyTo: (and #copyAllTo:)
> will throw up when the target file already exists.
>
> Do I need to explicitly remove the file before copying / copy the contents
> instead?
>
> Thanks,
> Peter
>


[Pharo-users] overriding FileReference>>copyTo: behavior

2018-09-17 Thread Peter Uhnak
Hi,

is there an API to copy a file that will override the target destination if
it already exists? I was quite surprised that #copyTo: (and #copyAllTo:)
will throw up when the target file already exists.

Do I need to explicitly remove the file before copying / copy the contents
instead?

Thanks,
Peter