diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-09-09 11:51:31 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-09-09 11:51:31 +0200 |
| commit | 478f3d4c387d67cb54a02ba373bfb4655d7a19f7 (patch) | |
| tree | 73acf4c2b864a18a6634ac6be5db4eca9bea767f /objects.js | |
| parent | a7b3c537edf83b8415716f930fd3fe518638c4db (diff) | |
| download | snap-478f3d4c387d67cb54a02ba373bfb4655d7a19f7.tar.gz snap-478f3d4c387d67cb54a02ba373bfb4655d7a19f7.zip | |
add file blocks
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -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('-'); |
