Skip to content

A simple Turbowarp extension that uses the File System Access API to dynamically update files.

License

Notifications You must be signed in to change notification settings

Anonymous-cat1/Update-File

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Update File (Direct Access)

By Anonymous_cat1, co-written by GPT-4o-Mini.

A simple Turbowarp extension that uses the File System Access API to dynamically update files.

Security note

This will allow any Turbowarp project unrestricted access any file you specify, which means it could modify, delete, or inject something into a file without you even knowing about it! Never allow access to files that you care about to a project you're not familiar with.

Browser support

Your browser must support the File System Access API, you can find a support list here. Otherwise, the extension will not work.

Installation

To use this extension in Turbowarp (or in it's very plentiful mods), open Add Extension > Custom Extension and paste this link.

YOU MUST LOAD UNSANDBOXED. OTHERWISE IT WILL NOT IMPORT.

https://anonymous-cat1.github.io/Update-File/extension.js

How to use

To start, you can open a file with the Set File block. This should open your system's file picker.

Now, you can update a file with the Write content to file from [Format Dropdown] (Text) block.

Dropdown options:

  • Text

  • URI/URL (using a url will download whatever content the page has)

To read a file, use the Get content from file as [Format Dropdown] reporter.

Dropdown options:

  • Text

  • URI (always encoded as Base64)

  • Hex (returns an array of bytes)

To read a file's metedata as JSON, use the Get file metadata as JSON reporter.

To check if a file is currentl;y opened, use the Is file opened? boolean.

To check if the current browser supports Direct Access (File System Access), use the Browser supports Direct Access? boolean.

Lastly, to close a flie you can use Close File.

About

A simple Turbowarp extension that uses the File System Access API to dynamically update files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published