Skip to content

Commit d9b8d89

Browse files
Improved file device message format doc
1 parent 6b7c71e commit d9b8d89

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,27 @@ 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, please review these important points:
35+
36+
* **Path Handling:** Paths can be provided either as absolute paths (e.g., /var/log/app.log or C:\Data\report.txt) or as relative paths.
37+
* **Relative Paths:** Relative paths are always interpreted relative to the allowed folder configured in the Workstation Management.
38+
* **Delimiter:** The # character is used as a delimiter within messages. Paths and data are not allowed to contain the # character.
39+
* **Case Sensitivity:** File and directory paths may be case-sensitive depending on the underlying operating system (e.g., Linux paths are typically case-sensitive, Windows paths are not).
3140

3241
### Message
3342

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`.
43+
* `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).
44+
* `1#Path` - Stop watching for changes in the specified `Path`.
45+
* `2#File path` - Read the content of the file at the specified `File Path`.
46+
* `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`.
3847

3948
### Response
4049

41-
* `R#File name` - `File name` was renamed (also triggered when file is created and deleted)
42-
* `C#File name` - `File name` was changed
50+
* `R#Path` - File or directory at the specified `Path` was renamed (also triggered when file/directory is created or deleted)
51+
* `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.
4352
* `D#Data` - `Data` from file read
4453
* `E#Error` - `Error` message from operating system
4554
* `S#{0,1,2,3}#directory` - The command `{0,1,2,3}` on `directory` was successful.

0 commit comments

Comments
 (0)