I did a lot of very deep windows programming in my previous job and
reminding me that I would always use the 8.3 short name for file
operations! dir /x will get it for you. Must be API called for it also.
Probably only works on local volumes not network rounded ones. Just a guess.

I've run into problems on some unix shells with maximum command-line
lengths.

-y


On Wed, 17 Apr 2024 at 11:58 PM, ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> On 4/17/24 19:10, William Michels via perl6-users wrote:
> > Hi Todd,
> >
> > Here are a few U&L StackExchange answers that I wrote using Raku's
> `unlink`:
> >
> >
> https://unix.stackexchange.com/questions/459521/how-to-truncate-file-to-maximum-number-of-characters-not-bytes/751267#751267
> >
> >
> https://unix.stackexchange.com/questions/749558/remove-exact-line-from-file-if-present-leave-the-rest-of-lines-error-handling/749581#749581
> >
> > (Suggestions welcome).
>
>
> Hi William,
>
> unlink($_) if $bak.IO:e & $bak.IO:f;
>
> Interesting!  Thank you.
>
> The problem is that you can not implicitly trust
> the file operations when programming on the kluge.
> Linux, no problem.
>
> I wish I had more Linux customers, but I do not.
>
> -T
>
> I do not know if you are, but I just append .tmp or .bak on to the name
> of my program.   I have never used Kernel32::GetTempTileNameA.
>
>
> https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettempfilenamea
>

Reply via email to