-
-
Save jakemac53/845b60847dbda53f93aeed8056d5fbd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
import 'package:path/path.dart' as p; | |
void main() async { | |
late File test; | |
try { | |
test = File.fromUri(Uri.file(p.absolute('test.'))); | |
print(await test.exists()); | |
await test.copy('test.copy'); | |
} catch (_) { | |
print('error copying ${test.uri}'); | |
} | |
try { | |
test = File('test.'); | |
print(await test.exists()); | |
await test.copy('test.copy'); | |
} catch (_) { | |
print('error copying ${test.uri}'); | |
} | |
try { | |
test = File.fromUri(Uri.file('test.')); | |
print(await test.exists()); | |
await test.copy('test.copy'); | |
} catch (_) { | |
print('error copying ${test.uri}'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment