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