Overview on files
Nova has a GUI for managing files, which is the text app and files app, but what if you want to make one such? what if you need to make a file explorer or a text editor, what about a media player?
You will see just that in this documentation!
Creating a file
How do you make a file out of thin air in nova? well, you can make a file using the Nova.js createFile()
function, nothing big nor complicated.
Using createFile
createFile
Take this, you are making a very basic text editor app, you need to save the stuff the user have been typing, here's how to use the createFile
function for that.
Where folderName
is the folder that the file should be saved at (the folder would be created if it doesn't exist.). fileName
is the name of the file without file type extension. type
is the type of the file, possible types are:
app
: apps will be executed in a new window once opened.image/png
,image/svg
,image/jpeg
,image/jpg
or any other will open in media viewer.video/mp4
,video/mpeg
,video/mkv
or any other will open in media viewer.other supported formats (html, wav, mp3 etc.)
8-bit arrays will be opened by default in text app as plain text.
File Metadata
By default, Nova OS saves the timestamp metadata. This is its format:
âš This saves the current date and time in the system's local time zone.
datetime
is the same asDate.now()
method in JavaScript.
Last updated
Was this helpful?