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