didSelectDisabledFile method
Returns whether a disabled file was selected on this message.
Implementation
(bool, String?) didSelectDisabledFile(Msg msg) {
if (_files.isEmpty) return (false, null);
if (msg is! KeyMsg) return (false, null);
if (!msg.key.matchesSingle(_keyMap.select)) {
return (false, null);
}
final file = _files[_selected];
final fileName = file.name;
if (!file.isDirectory && !canSelect(fileName)) {
return (true, p.join(_currentDirectory, fileName));
}
return (false, null);
}