-
-
Notifications
You must be signed in to change notification settings - Fork 19
OSL ‐ File Handling
Info About files structure here
-
file "open" file-path:
- Opens the selected file to be modified.
- Sets the "file" variable to the raw JSON of the current file.
- Sets the "data" variable to the data value of the open file.
-
file "open" "id" file-id:
- Opens a file with the specified "file-id" for modification.
-
file "open" file-name file-id:
- Opens a file with the specified "file-name" and "file-id" for modification.
-
file "open" "myself":
- Opens the currently selected file for modification.
-
file "exists" file-path:
- Returns a boolean indicating whether a file exists and is accessible by the current program.
-
file "start":
- Runs/opens the current file in its default application.
-
file "render" size:
- Renders the currently open file.
- You can add "interactable" at the end of this command to render it as a file instead of as an icon.
-
file "add" complete-file-json:
- Adds the passed JSON representation of a file to the downloads folder of the logged-in user.
-
file "get" data-id:
- Gets a specific file entry based on the data ID.
-
file "set" data-id:
- Sets a specific file entry based on the data ID.
-
rightclick "file/text/window" "file-id/text/window-id":
- Represents a right-click action on a file, text, or window with specified IDs.
-
file "install_type" type_code(
examples:app/osl/icn
) file_type_icon(this is written in icn
) file_type(examples:3d Model/Script/Application
):- Adds a new file type to the os system
- Example:
file "install_type" "txt" "c #588fbf w 6 square 0 -2 5 6 square -2 3 3 5 w 3 c #335776 line 2 9.5 6.5 5 cont 2 5 cont 2 9.5 w 2 line -4 1 4 1 line -4 -3 0 -3 line -4 -7 2 -7" "Text File"
These commands and file attributes allow for file management and manipulation within the OriginOS environment. They enable you to work with files, open them, render them, and perform various operations on them.
You can find the file id of the current window's app file using the "current_file" variable
You can get the file path of the current window's app file with the "current_file_path" variable
originOS is a web desktop gui with a self contained file system, programming languages, internet system and a whole lot of stuff an os should be able to do Use originOS here