platform/packages/mustache/lib/src/mustache_context.dart
Tobe O c94bec26ec Add 'packages/mustache/' from commit 'd0335a925d7199f3a5988ca10da36fee38ce0c43'
git-subtree-dir: packages/mustache
git-subtree-mainline: 9458a72c57
git-subtree-split: d0335a925d
2020-02-15 18:29:03 -05:00

20 lines
485 B
Dart

import 'package:file/file.dart';
import 'package:path/path.dart' as path;
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}');
}
}