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]link_file(+OldPath, +NewPath, +Type)
Create a link in the filesystem from NewPath to OldPath. Type defines the type of link and is one of hard or symbolic.

With some limitations, these functions also work on Windows. First of all, the underlying filesystem must support links. This requires NTFS. Second, symbolic links are only supported in Vista and later.

Errors
domain_error(link_type, Type) if the requested link-type is unknown or not supported on the target OS.