nc-photos/app/lib/use_case/ls_single_file.dart

15 lines
417 B
Dart
Raw Normal View History

2021-07-02 21:43:15 +02:00
import 'package:nc_photos/account.dart';
import 'package:nc_photos/di_container.dart';
2021-07-02 21:43:15 +02:00
import 'package:nc_photos/entity/file.dart';
class LsSingleFile {
LsSingleFile(this._c) : assert(require(_c));
static bool require(DiContainer c) => DiContainer.has(c, DiType.fileRepo);
2021-07-02 21:43:15 +02:00
Future<File> call(Account account, String path) =>
_c.fileRepo.listSingle(account, File(path: path));
2021-07-02 21:43:15 +02:00
final DiContainer _c;
2021-07-02 21:43:15 +02:00
}