File System
These global variables provide information about file types, file handling, and file operations in the OSL environment.
File Type Definitions
The file_types
object contains definitions for various file types recognized by the system. Each entry includes:
Icon definition (for visual representation)
Description of the file type
Associated applications that can open the file type
Here's a summary of some key file types defined in the system:
.folder
Directory/Folder
Files.osl
.osl
Origin Script
Process_Opener.osl, Studio.osl
.orsl
Origin Script
Process_Opener.osl, Studio.osl
.txt
Plain Text
Studio.osl
.md
Markdown
Studio.osl
.json
JSON File
Studio.osl
.xml
Markup
Studio.osl
.js
Javascript
Studio.osl
.html
HTML File
Studio.osl
.css
CSS File
Studio.osl
.py
Python
Studio.osl
.png
, .jpg
, .jpeg
, .webp
, .bmp
Image Files
Previewer.osl
.mp4
, .webm
Video Files
Media_Player.osl
.mp3
, .wav
, .flac
Audio Files
Media_Player.osl
File Constants and Special Values
null
Null
Special value representing null or empty
newline
String
String representing a newline character
infinity
Number
Special value representing infinity
Examples
Notes
The file types configuration is used by the system to determine how to display and handle different file types.
New file types can be registered by applications by extending the
file_types
object.The icon definition uses a custom drawing syntax to define how the file type's icon should appear.
Applications associated with file types are paths to OSL script files that can handle the specified file type.
Last updated
Was this helpful?