blob: 483d44f4a0b1c79cf750960733a53e73490effc7 [file] [log] [blame]
import 'package:file/src/io.dart' as io;
String getPath(path) {
if (path is io.FileSystemEntity) {
return path.path;
} else if (path is String) {
return path;
} else if (path is Uri) {
return path.toFilePath();
} else {
throw new ArgumentError('Invalid type for "path": ${path?.runtimeType}');
}
}