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 NovaOS? Well, you can make a file using the NTX's createFile() function, nothing big or complicated.
Using createFile
createFileTake this, you are making an elementary text editor app, you need to save the stuff the user has been typing, here's how to use the createFile function for that.
await ntx.fileSet.createFile(folderName, fileName, type, content, metadata)Where folderName is the folder where the file should be saved (the folder will be created if it doesn't exist). fileName is the name of the file without the file type extension. type is the type of the file, possible types are:
app: Apps will be executed in a new window if they are opened.image/png,image/svg,image/jpeg,image/jpg,video/mp4,video/mpeg,video/mkvor any other will open in the registered media viewer.other supported formats (html, wav, mp3 etc.)
8-bit arrays will be opened by default in the text app as plain text.
File Metadata
By default, Nova OS saves the timestamp metadata. This is its format:
{"via":"nope","datetime":1731327471707}⚠ This saves the current date and time in the system's local time zone.
datetimeis the same asDate.now()method in JavaScript.
Last updated
Was this helpful?