Logo
develop
  • 介紹
  • 安裝
  • 教學
  • CI 教學
  • 開發運維指南
  • 安全性
  • 整合
  • 範例
  • 參考
    • 二進位模型
    • 命令
    • conanfile.py
    • conanfile.txt
    • Conan Server
    • 組態檔
    • 環境變數
    • 擴充功能
    • Policies
    • 配方工具
      • conan.tools.android
      • conan.tools.apple
      • conan.tools.build
      • conan.tools.cmake
      • conan.tools.CppInfo
      • conan.tools.env
      • conan.tools.files
        • conan.tools.files basic operations
        • conan.tools.files downloads
        • conan.tools.files patches
        • conan.tools.files checksums
        • conan.tools.files.symlinks
      • conan.tools.gnu
      • conan.tools.google
      • conan.tools.intel
      • conan.tools.layout
      • conan.tools.meson
      • conan.tools.microsoft
      • conan.tools.qbs
      • conan.tools.ros
      • conan.tools.sbom
      • conan.tools.scm
      • conan.tools.scons
      • conan.tools.premake
      • conan.tools.system
    • 執行器
    • 工作空間
  • Knowledge
  • 孵化中的功能
  • What’s new in Conan 2
  • 變更日誌
conan
  • 參考
  • 配方工具
  • conan.tools.files
  • conan.tools.files.symlinks
  • Edit on GitHub

conan.tools.files.symlinks

conan.tools.files.symlinks.absolute_to_relative_symlinks()

absolute_to_relative_symlinks(conanfile, base_folder)

Convert the symlinks with absolute paths into relative ones if they are pointing to a file or directory inside the base_folder. Any absolute symlink pointing outside the base_folder will be ignored.

參數:
  • conanfile – 目前的配方物件。一律使用 self。

  • base_folder – Folder to be scanned.

conan.tools.files.symlinks.remove_external_symlinks()

remove_external_symlinks(conanfile, base_folder)

Remove the symlinks to files that point outside the base_folder, no matter if relative or absolute.

參數:
  • conanfile – 目前的配方物件。一律使用 self。

  • base_folder – Folder to be scanned.

conan.tools.files.symlinks.remove_broken_symlinks()

remove_broken_symlinks(conanfile, base_folder=None)

Remove the broken symlinks, no matter if relative or absolute.

參數:
  • conanfile – 目前的配方物件。一律使用 self。

  • base_folder – Folder to be scanned.

Previous Next

© Copyright 2016-2026, JFrog. 最後更新於 11月 16, 2026。