summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/objects.js b/objects.js
index 100bd67..d432dcb 100644
--- a/objects.js
+++ b/objects.js
@@ -883,6 +883,36 @@ SpriteMorph.prototype.initBlocks = function () {
category: 'sensing',
spec: 'current %dates'
},
+ reportFileOrDirectoryContent: {
+ type: 'reporter',
+ category: 'sensing',
+ spec: 'content of the %fileOrDir %s'
+ },
+ doSetFileContent: {
+ type: 'command',
+ category: 'sensing',
+ spec: 'write %s to the file %s'
+ },
+ doCreateFileOrDirectory: {
+ type: 'command',
+ category: 'sensing',
+ spec: 'create %fileOrDir %s'
+ },
+ reportFileOrDirectoryExists: {
+ type: 'predicate',
+ category: 'sensing',
+ spec: '%fileOrDir %s exists'
+ },
+ doDeleteFileOrDirectory: {
+ type: 'command',
+ category: 'sensing',
+ spec: 'delete the %fileOrDir %s'
+ },
+ reportHomeDirectory: {
+ type: 'reporter',
+ category: 'sensing',
+ spec: 'home directory'
+ },
doVibrate: {
type: 'command',
category: 'sensing',
@@ -1927,6 +1957,13 @@ SpriteMorph.prototype.blockTemplates = function (category) {
blocks.push('-');
blocks.push(block('reportDate'));
blocks.push('-');
+ blocks.push(block('reportFileOrDirectoryContent'));
+ blocks.push(block('doSetFileContent'));
+ blocks.push(block('doCreateFileOrDirectory'));
+ blocks.push(block('reportFileOrDirectoryExists'));
+ blocks.push(block('doDeleteFileOrDirectory'));
+ blocks.push(block('reportHomeDirectory'));
+ blocks.push('-');
blocks.push(block('reportLanguage'));
blocks.push(block('reportLocation'));
blocks.push('-');
@@ -5049,6 +5086,13 @@ StageMorph.prototype.blockTemplates = function (category) {
blocks.push('-');
blocks.push(block('reportDate'));
blocks.push('-');
+ blocks.push(block('reportFileOrDirectoryContent'));
+ blocks.push(block('doSetFileContent'));
+ blocks.push(block('doCreateFileOrDirectory'));
+ blocks.push(block('reportFileOrDirectoryExists'));
+ blocks.push(block('doDeleteFileOrDirectory'));
+ blocks.push(block('reportHomeDirectory'));
+ blocks.push('-');
blocks.push(block('reportLanguage'));
blocks.push(block('reportLocation'));
blocks.push('-');