[Cuis-dev] fileout. Method to create a new filename

Juan Vuletich juan at jvuletich.org
Thu Sep 16 10:25:16 PDT 2021


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/20210916/bbe5f564/attachment.htm>


More information about the Cuis-dev mailing list