Datalad Next Logo
1.4.1
  • High-level API commands
  • Command line reference
  • Infrastructure classes and utilities
    • datalad_next.archive_operations
    • datalad_next.commands
    • datalad_next.config
    • datalad_next.constraints
    • datalad_next.consts
    • datalad_next.credman
    • datalad_next.datasets
    • datalad_next.exceptions
    • datalad_next.iterable_subprocess
    • datalad_next.itertools
    • datalad_next.iter_collections
    • datalad_next.repo_utils
    • datalad_next.runners
    • datalad_next.shell
    • datalad_next.tests
    • datalad_next.tests.fixtures
    • datalad_next.types
    • datalad_next.uis
    • datalad_next.url_operations
    • datalad_next.utils
      • datalad_next.utils.DataladAuth
      • datalad_next.utils.MultiHash
      • datalad_next.utils.check_symlink_capability
        • check_symlink_capability()
      • datalad_next.utils.chpwd
      • datalad_next.utils.ensure_list
      • datalad_next.utils.external_versions
      • datalad_next.utils.log_progress
      • datalad_next.utils.parse_www_authenticate
      • datalad_next.utils.patched_env
      • datalad_next.utils.rmtree
      • datalad_next.utils.get_specialremote_param_dict
      • datalad_next.utils.get_specialremote_credential_properties
      • datalad_next.utils.update_specialremote_credential
      • datalad_next.utils.needs_specialremote_credential_envpatch
      • datalad_next.utils.get_specialremote_credential_envpatch
      • ParamDictator
  • Git-remote helpers
  • Git-annex backends
  • Git-annex special remotes
  • DataLad patches
  • Developer Guide
Datalad Next
  • Python tooling
  • datalad_next.utils
  • datalad_next.utils.check_symlink_capability

datalad_next.utils.check_symlink_capability

datalad_next.utils.check_symlink_capability(path: Path, target: Path) → bool[source]

helper similar to datalad.tests.utils_pytest.has_symlink_capability

However, for use in a datalad command context, we shouldn't assume to be able to write to tmpfile and also not import a whole lot from datalad's test machinery. Finally, we want to know, whether we can create a symlink at a specific location, not just somewhere. Therefore use arbitrary path to test-build a symlink and delete afterwards. Suitable location can therefore be determined by high lever code.

Parameters:
  • path (Path) --

  • target (Path) --

Return type:

bool

Previous Next

© Copyright 2018-2024, DataLad team.

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