compass
1.0.0

User's guide

  • Quick Start for Users
  • Test Cases
  • Config Files
  • Test Suites
  • Landice core
  • Ocean core
  • Machines

Developer's guide

  • Quick Start for Developers
  • Overview
  • Command-line interface
  • Organization of Tests
  • Landice core
  • Ocean core
  • Framework
  • Machines
  • Troubleshooting
  • Documentation
  • Building the Documentation
  • API reference
    • MPAS Cores
    • compass framework
      • Command-line interface
      • Base Classes
      • testcase
      • step
      • config
      • io
        • compass.io.download
        • compass.io.symlink
      • logging
      • model
      • mpas_cores
      • parallel
      • provenance
      • validate
  • Design Documents

Tutorials

  • Developer Tutorial: Adding a new test group
  • Developer Tutorial: Adding a parameter study
  • Developer Tutorial: Porting a legacy COMPASS test group

Glossary

  • Glossary

Versions

  • Code and Documentation Versions
compass
  • »
  • API reference »
  • compass.io.symlink
  • View page source

compass.io.symlink¶

compass.io.symlink(target, link_name, overwrite=True)[source]¶

From https://stackoverflow.com/a/55742015/7728169 Create a symbolic link named link_name pointing to target. If link_name exists then FileExistsError is raised, unless overwrite=True. When trying to overwrite a directory, IsADirectoryError is raised.

Parameters
  • target (str) – The file path to link to

  • link_name (str) – The name of the new link

  • overwrite (bool, optional) – Whether to replace an existing link if one already exists

Previous Next

© Copyright Copyright (c) 2013-2021, Los Alamos National Security, LLC (LANS) (Ocean: LA-CC-13-047;Land Ice: LA-CC-13-117) and the University Corporation for Atmospheric Research (UCAR)..

Built with Sphinx using a theme provided by Read the Docs.