Skip to content

Commit 105c5ce

Browse files
committed
implement experimental node module loader
1 parent 2a35306 commit 105c5ce

26 files changed

Lines changed: 538 additions & 24 deletions

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For example, a Machine with some built-in MFeatures can be created like this:
1111
#include <jaculus/features/stdioFeature.h>
1212
#include <jaculus/features/filesystemFeature.h>
1313
#include <jaculus/features/basicStreamFeature.h>
14-
#include <jaculus/features/moduleLoaderFeature.h>
14+
#include <jaculus/features/simpleModuleLoaderFeature.h>
1515
#include <jaculus/features/util/ostreamjs.h>
1616

1717

src/jac/features/filesystemFeature.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,18 @@ class FilesystemFeature : public Next {
8686
return buffer;
8787
}
8888

89+
bool existsCode(std::string path_) {
90+
return std::filesystem::exists(_feature._codeDir / path_);
91+
}
92+
93+
bool isFileCode(std::string path_) {
94+
return std::filesystem::is_regular_file(_feature._codeDir / path_);
95+
}
96+
97+
bool isDirectoryCode(std::string path_) {
98+
return std::filesystem::is_directory(_feature._codeDir / path_);
99+
}
100+
89101

90102
File open(std::string path_, std::string flags) {
91103
return File(_feature._workingDir / path_, flags);

0 commit comments

Comments
 (0)