Skip to content

Commit cf8622e

Browse files
Merge pull request mendix#10510 from louis-baranger-mendix/development
Workstation device syntax update
2 parents 012af00 + 59e90a8 commit cf8622e

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

content/en/docs/workstation/wks-message-syntax.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,28 @@ This device type requires the following message and response:
2828
## File Device {#file-device}
2929

3030
This device type requires the following message and response:
31+
32+
### Important Considerations
33+
34+
Before sending messages to the File Device, review the following points:
35+
36+
* Path handling - You can provide the paths either as absolute (for example, `/var/log/app.log` or `C:\Data\report.txt`), or as relative paths. Relative paths are always interpreted relative to the allowed folder configured in Workstation Management.
37+
* Delimiter - The `#` character is used as a delimiter within messages. Paths and data may not contain the `#` character.
38+
* Case sensitivity - File and directory paths may be case-sensitive depending on the underlying operating system. For example, Linux paths are typically case-sensitive, while Windows paths are not.
3139

3240
### Message
3341

34-
* `0#Directory` - Watch for changes in `Directory`. If `Directory` is a file path, then watch for changes in the file. `Directory` is relative to the folder configured in Workspace management. Environment variables (for example, `%public%`) are supported.
35-
* `1#Directory` - Stop watching for changes in `Directory`.  
36-
* `2#File path` - Read file at `File path`.
37-
* `3#File path#Data#flag` - Write to file at `File path`. The `flag` can be `w` for overwrite, `a` for append If left blank, the value defaults to `w`.
42+
* `0#Path` - Initiate watching for changes in the specified `Path`. If `Path` is a directory, the device will watch for changes within that directory (creation, deletion, renaming, or modification of files/subdirectories). If `Path` is a file, the device will watch for changes to that specific file (modification, deletion, or renaming).
43+
* `1#Path` - Stop watching for changes in the specified `Path`.
44+
* `2#File path` - Read the content of the file at the specified `File Path`.
45+
* `3#File path#Data#flag` - Write `Data` to the file at the specified `File Path`. The `flag` can be `w` for overwrite, `a` for append If left blank, the value defaults to `w`.
3846

3947
### Response
4048

41-
* `R#File name` - `File name` was renamed (also triggered when file is created and deleted)
42-
* `C#File name` - `File name` was changed
43-
* `D#Data` - `Data` from file read
44-
* `E#Error` - `Error` message from operating system
49+
* `R#Path` - File or directory at the specified `Path` was renamed, created, or deleted.
50+
* `C#Path` - File or directory at the specified `Path` was changed. This is triggered both when a file is modified and when the contents of a directory changes.
51+
* `D#Data` - `Data` from file read.
52+
* `E#Error` - `Error` message from operating system.
4553
* `S#{0,1,2,3}#directory` - The command `{0,1,2,3}` on `directory` was successful.
4654

4755
### Example Test

0 commit comments

Comments
 (0)