HI
I have the following scenario:
'/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference / 'book.pillar'
>>>
"File @ /PharoBooks/Booklet-AMiniSchemeInPharo/_result/book.pillar"
ok it works.
I want to update the contents of a target folder only if a file is
missing or too old compared to a source.
The idea is that I have a target folder and I need to know if a file
located in the source tree should be copied under the target.
So I compute the difference from the root of the source to the file
and I want to apply this path to the target to check some file
properties.
now I do not understand how I can get the following working:
'/PharoBooks/Booklet-AMiniSchemeInPharo/_result' asFileReference /
('/PharoBooks/Booklet-AMiniSchemeInPharo/book.pillar'
asFileReference path)
relativeTo: ('/PharoBooks/Booklet-AMiniSchemeInPharo'
asFileReference path)
You see relativeTo: should tells me the diff in terms of path between
two paths.
Stef
On Fri, Feb 2, 2018 at 10:27 PM, Denis Kudriashov <[email protected]> wrote:
> Hi
>
> Can you provide more simple example with shorter paths? I am lost in these
> long strings :).
>
> 2018-02-02 20:22 GMT+01:00 Stephane Ducasse <[email protected]>:
>>
>> HI
>>
>> I have the following scenario:
>>
>>
>> '/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'
>> asFileReference /
>> 'book.pillar'
>>
>> >>>
>> "File @
>> /Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result/book.pillar"
>>
>> ok it works.
>>
>> I want to update the contents of a target folder only if a file is
>> missing or too old compared to a source.
>>
>> The idea is that I have a target folder and I need to know if a file
>> located in the source tree should be copied under the target.
>> So I compute the difference from the root of the source to the file
>> and I want to apply this path to the target to check some file
>> properties.
>>
>> now I do not understand how I can get the following working:
>>
>>
>> '/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/_result'
>> asFileReference
>> /
>>
>>
>> ('/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo/book.pillar'
>> asFileReference path)
>> relativeTo:
>> ('/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/PharoBooks/Booklet-AMiniSchemeInPharo'
>> asFileReference path)
>>
>>
>> Stef
>>
>