Open stephane-archer opened 4 days ago
Look at chmod and chown.
Read up on Linux permissions.
On Thu, Nov 14, 2024, 3:55 AM Stéphane Archer @.***> wrote:
I didn't find the right way to do this
— Reply to this email directly, view it on GitHub https://github.com/onepub-dev/dart_posix/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG32OD5PAYST5SAFZODSXL2AN76LAVCNFSM6AAAAABRW6M6JCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2TMMJVGI4DKMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I was able to make it work, thank you for your help:
var inputMode = inputFile.statSync().mode;
String permissions = FileOperations.modeOctalString(inputMode);
chmod(outputFile.path, permissions);
you might want to add a chmod
version that takes a mode
rather than an octal string to make it easier to use with the standard library
I didn't find the right way to do this