diff --git a/lib/oto/commands/file/file.dart b/lib/oto/commands/file/file.dart index 01a7858..4057df5 100644 --- a/lib/oto/commands/file/file.dart +++ b/lib/oto/commands/file/file.dart @@ -4,6 +4,7 @@ import 'dart:async'; import 'dart:io'; import 'package:oto_cli/oto/commands/command.dart'; import 'package:oto_cli/oto/data/command_data.dart'; +import 'package:path/path.dart' as path; class FileRead extends Command { @override @@ -76,6 +77,9 @@ class FileInfo extends Command { var stat = await file.stat(); var map = {}; map['path'] = file.path; + map['name'] = path.basename(file.path); + map['withoutExtentionName'] = path.withoutExtension(map['baseName']); + map['extension'] = path.extension(file.path); map['symbolicPath'] = await file.resolveSymbolicLinks(); map['size'] = stat.size; map['accessed'] = stat.accessed.toString();