3 library(filesex): Extended operations on files
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog C-library
        • library(filesex): Extended operations on files
          • set_time_file/3
          • link_file/3
          • relative_file_name/3
          • directory_file_path/3
          • directory_member/3
          • copy_file/2
          • make_directory_path/1
          • copy_directory/2
          • delete_directory_and_contents/1
          • delete_directory_contents/1
          • chmod/2
Availability::- use_module(library(filesex)).(can be autoloaded)
Source[det]chmod(+File, +Spec)
Set the mode of the target file. Spec is one of +Mode, -Mode or a plain Mode, which adds new permissions, revokes permissions or sets the exact permissions. Mode itself is an integer, a POSIX mode name or a list of POSIX mode names. Defines names are suid, sgid, svtx and all names defined by the regular expression [ugo]*[rwx]*. Specifying none of "ugo" is the same as specifying all of them. For example, to make a file executable for the owner (user) and group, we can use:
?- chmod(myfile, +ugx).