[Pharo-project] FileSystem and file extensions

Igor Stasenko siguctua at gmail.com
Sun Jun 17 21:26:19 EDT 2012


yep.
extension should be the thing after _last_ dot.

On 18 June 2012 02:35, Sean P. DeNigris <sean at clipperadams.com> wrote:
>
> Eliot Miranda-2 wrote
>>
>>     #('foo' 'foo.tar' 'foo.tar.gz' 'foo.1.tar' 'foo.1.tar.gz') collect:
>> [:thing| thing extension] => #('' 'tar' 'gz' 'tar' 'gz')
>> and
>>     #('foo' 'foo.tar' 'foo.tar.gz' 'foo.1.tar' 'foo.1.tar.gz') collect:
>> [:thing| thing extensions] => #(#() #('tar') #('gz' 'tar') #('tar' '1')
>> #('gz' 'tar' '1'))
>> or
>>     #('foo' 'foo.tar' 'foo.tar.gz' 'foo.1.tar' 'foo.1.tar.gz') collect:
>> [:thing| thing extensions] => #(#() #('tar') #('tar' 'gz') #('1' 'tar')
>> #('1' 'tar' 'gz'))
>>
>
> Sounds good.
>
> --
> View this message in context: http://forum.world.st/FileSystem-and-file-extensions-tp4635256p4635293.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>



-- 
Best regards,
Igor Stasenko.




More information about the Pharo-dev mailing list