platform/packages/mustache/lib/src/mustache_context.dart
2021-06-20 20:37:20 +08:00

19 lines
441 B
Dart

import 'package:file/file.dart';
class MustacheContext {
Directory? viewDirectory;
Directory? partialDirectory;
String? extension;
MustacheContext([this.viewDirectory, this.partialDirectory, this.extension]);
File resolveView(String viewName) {
return viewDirectory!.childFile('$viewName$extension');
}
File resolvePartial(String partialName) {
return partialDirectory!.childFile('$partialName$extension');
}
}