Sample code for 30+ languages & platforms
Dart

Get the Target of a Symbolic Link

See more FileAccess Examples

Demonstrates how to get the target of a symbolic link.

Note: This example requires Chilkat v9.5.0.77 or greater.

Chilkat Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

void main() {
  final fac = CkFileAccess();

  final String targetPath;
  try {
    targetPath = fac.symlinkTarget('qa_data/my_symlink');
  } on ChilkatException {
    print('Failed to get symlink target.');
    return;
  }

  print('target path = $targetPath');
}