Re: need native call help

2024-04-19 Thread Todd Chester via perl6-users
On 4/18/24 04:50, yary wrote: 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

Re: need native call help

2024-04-18 Thread yary
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

Re: need native call help

2024-04-17 Thread ToddAndMargo via perl6-users
On 4/17/24 19:10, William Michels via perl6-users wrote: Hi Todd, Here are a few U 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

Re: need native call help

2024-04-17 Thread William Michels via perl6-users
Hi Todd, Here are a few U 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

Re: need native call help

2024-04-17 Thread ToddAndMargo via perl6-users
On 4/17/24 05:52, yary wrote: From unlink's documentation: If the file to be deleted does not exist, the routine treats it as success. So trying to delete a file that isn't there, doesn't have an error, which is kind of neat, but that is a difference from native delete. -y Hi Yary, Not

Re: need native call help

2024-04-17 Thread ToddAndMargo via perl6-users
On 4/17/24 05:52, yary wrote: From unlink's documentation: If the file to be deleted does not exist, the routine treats it as success. So trying to delete a file that isn't there, doesn't have an error, which is kind of neat, but that is a difference from native delete. -y Hi Yary, Not

Re: need native call help

2024-04-17 Thread ToddAndMargo via perl6-users
On 4/17/24 05:50, yary wrote: What does the windows native delete do which you need, that raku's unlink doesn't have? without unlink $FileName { say "Could not delete $FileName:", .exception.message }; -y Hi Yary, This is Windows we are dealing with. It is a kluge. I have had unlink

Re: need native call help

2024-04-17 Thread yary
>From unlink's documentation: If the file to be deleted does not exist, the routine treats it as success. So trying to delete a file that isn't there, doesn't have an error, which is kind of neat, but that is a difference from native delete. -y On Wed, Apr 17, 2024 at 8:50 AM yary wrote: >

Re: need native call help

2024-04-17 Thread yary
What does the windows native delete do which you need, that raku's unlink doesn't have? without unlink $FileName { say "Could not delete $FileName:", .exception.message }; -y On Wed, Apr 17, 2024 at 2:29 AM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 4/16/24 23:25,

Re: need native call help

2024-04-17 Thread ToddAndMargo via perl6-users
On 4/16/24 23:25, ToddAndMargo via perl6-users wrote: `\\>\` should have been `\\?\`

Re: need native call help

2024-04-17 Thread ToddAndMargo via perl6-users
On 4/16/24 20:57, ToddAndMargo via perl6-users wrote:    $LongName = $FileName;    if $FileName.chars >= MAX_PATH  { $LongName = Q[\\?\] ~ $FileName; } What the about is all about is that MAX_PATH, which limits the file name to 260 characters, can go up to 32,767 wide characters, prepend

Re: need native call help

2024-04-16 Thread ToddAndMargo via perl6-users
On 4/16/24 18:43, ToddAndMargo via perl6-users wrote: On 4/16/24 01:21, ToddAndMargo via perl6-users wrote: Hi All, Windows 11 It has been so long that I have done one of these that my brain is seizing. https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-deletefilea C++

Re: need native call help

2024-04-16 Thread ToddAndMargo via perl6-users
On 4/16/24 01:21, ToddAndMargo via perl6-users wrote: Hi All, Windows 11 It has been so long that I have done one of these that my brain is seizing. https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-deletefilea C++ BOOL DeleteFileA(   [in] LPCSTR lpFileName ); Would