[Cuis-dev] fileout. Method to create a new filename
Nicola Mingotti
nmingotti at gmail.com
Fri Sep 17 13:11:21 PDT 2021
Hi Juan,
doh, i did not see it !
yes, '#nextNameFor: ...' does what I wanted, forget my fileout.
bye
Nicola
On 9/16/21 7:25 PM, Juan Vuletich wrote:
> Hi Nicola,
>
> This looks like essentially equivalent to #nextNameFor:extension: , right?
>
> Thanks,
>
> On 9/14/2021 1:57 PM, Nicola Mingotti via Cuis-dev wrote:
>>
>> there was a little bug, sorry, here the corrected version.
>>
>> excuse me Juan, i forgot to put you in copy in the first mail, i do
>> it now.
>>
>>
>> bye
>> Nicola
>>
>>
>>
>> On 9/14/21 3:21 PM, Nicola Mingotti wrote:
>>>
>>> Hi Juan, guys,
>>>
>>> consider if you wish to add this method. I find it useful.
>>>
>>> It is often practical to be able to create uniquely named new file,
>>> for example
>>> for logs, or as container for intermediate computations. This method
>>> provides for it.
>>>
>>> It has not external dependencies.
>>>
>>> ---- Example ----
>>> '/tmp' asDirectoryEntry newFileName: 'fooTemp' ext: 'txt'. =>
>>> '/tmp/fooTemp-1.txt'
>>> '/tmp/fooTemp-1.txt' asFileEntry fileContents: 'foo contents'.
>>> '/tmp' asDirectoryEntry newFileName: 'fooTemp' ext: 'txt'. =>
>>> /tmp/fooTemp-2.txt
>>> -----------------
>>>
>>> bye
>>> Nicola
>>>
>>>
>>>
>>
>
>
> --
> Juan Vuletich
> www.cuis-smalltalk.org
> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
> https://github.com/jvuletich
> https://www.linkedin.com/in/juan-vuletich-75611b3
> @JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210917/2d486d27/attachment.htm>
More information about the Cuis-dev
mailing list