[Gambas-user] Stat() Auth and Mode (misunderstanding or bug?)

Benoît Minisini gambas at ...1...
Thu Sep 18 01:53:22 CEST 2014


Le 18/09/2014 01:50, Willy Raets a écrit :
> Hi all,
>
> Following was brought to my attention:
>
> To reproduce make a file named test in your home folder.
> Create a console project in IDE with any name you like
>
> Public Sub Main()
>
>    Dim sPath As String
>    sPath = User.Home &/ "test"
>    With Stat(sPath)
>      Print "Auth: " & .Auth
>      Print "Mode: " & .Mode
>   End With
>
> End
>
> Run the project.
> Output is:
>
> Auth: rw-r--r--
> Mode: 420
>
> Should mode not be 644 or do I misunderstand Stat().Mode?
>
> user rw- = 6
> group r-- = 4
> other r-- = 4
>

644 is octal. In decimal it is 420.

-- 
Benoît Minisini




More information about the User mailing list