node-red/packages/node_modules/@node-red/nodes/examples/storage/read file/01 - Read string from a fil...

113 lines
2.5 KiB
JSON

[
{
"id": "84222b92.d65d18",
"type": "inject",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "Hello, World!",
"payloadType": "str",
"x": 190,
"y": 180,
"wires": [
[
"b4b9f603.739598"
]
]
},
{
"id": "7b014430.dfd94c",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "Write string to a file, then read from the file",
"info": "Read file node can read string from a file.",
"x": 220,
"y": 100,
"wires": []
},
{
"id": "b4b9f603.739598",
"type": "file",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 380,
"y": 180,
"wires": [
[
"6dc01cac.5c4bf4"
]
]
},
{
"id": "2587adb9.7e60f2",
"type": "debug",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 180,
"wires": []
},
{
"id": "6dc01cac.5c4bf4",
"type": "file in",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 580,
"y": 180,
"wires": [
[
"2587adb9.7e60f2"
]
]
},
{
"id": "f4b4309a.3b78a",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↑read result from file",
"info": "",
"x": 590,
"y": 220,
"wires": []
},
{
"id": "672d3693.3cabd8",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 400,
"y": 140,
"wires": []
}
]