txt: ## mode.md
  mode
  
  Combined from primary sources listed below.
  
  # [In IO::Special](#___top "go to top of document")[§](#(IO::Special)_method_mode "direct link")
  
  See primary documentation
  [in context](/type/IO/Special#method_mode)
  for **method mode**.
  
  ```raku
  method mode(IO::Special:D: --> Nil)
  ```
  
  The mode for the filehandle, it always returns [`Nil`](/type/Nil)
  
  # [In IO::Path](#___top "go to top of document")[§](#(IO::Path)_method_mode "direct link")
  
  See primary documentation
  [in context](/type/IO/Path#method_mode)
  for **method mode**.
  
  Return an [`IntStr`](/type/IntStr) object representing the POSIX permissions of a file. The [`Str`](/type/Str) part of the result is the octal representation of the file permission, like the form accepted by the `chmod(1)` utility.
  
  ```raku
  say ~"path/to/file".IO.mode;  # e.g. '0644'
  say +"path/to/file".IO.mode;  # e.g. 420, where sprintf('%04o', 420) eq '0644'
  
  ```
  
  The result of this can be used in the other methods that take a mode as an argument.
  
  ```raku
  "path/to/file1".IO.chmod("path/to/file2".IO.mode);  # will change the
                                                      # permissions of file1
                                                      # to be the same as file2
  
  ```
  
  # [In X::IO::Mkdir](#___top "go to top of document")[§](#(X::IO::Mkdir)_method_mode "direct link")
  
  See primary documentation
  [in context](/type/X/IO/Mkdir#method_mode)
  for **method mode**.
  
  Returns the permissions mask of the failed [mkdir](/routine/mkdir) operation as an [`Int`](/type/Int).
  