platform/packages/mustache/lib/src/mustache_context.dart

20 lines
441 B
Dart
Raw Normal View History

2017-11-18 18:39:10 +00:00
import 'package:file/file.dart';
class MustacheContext {
2021-06-20 12:37:20 +00:00
Directory? viewDirectory;
2021-06-20 12:37:20 +00:00
Directory? partialDirectory;
2021-06-20 12:37:20 +00:00
String? extension;
MustacheContext([this.viewDirectory, this.partialDirectory, this.extension]);
File resolveView(String viewName) {
2021-06-20 12:37:20 +00:00
return viewDirectory!.childFile('$viewName$extension');
}
File resolvePartial(String partialName) {
2021-06-20 12:37:20 +00:00
return partialDirectory!.childFile('$partialName$extension');
}
}