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). HTH, Bill > On Apr 17, 2024, at 17:14, ToddAndMargo via perl6-users > <perl6-us...@perl.org> wrote: > > 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 to beat a dead horse, but when does that stop me! > <maniacal laughter> > > In Windows, if the filename/path exceeds 260 characters > (MAX_PATH), unlink will think that the file does not > exist and will let you blissfully think it has been removed, > when in reality, it is still there. > > -T