promotional bannermobile promotional banner

JavaScriptJS

allow kubejs write js file

English

Added the following to KubeJS's JsonIO:

  • writeAndCreateDirectories - Creates parent directories when writing a JSON file
  • findJsonInDirectory - Can be used to find paths of all JSON files in a directory
  • read(path,reader) - Get all files under the path directory and execute the reader function.
    reader:(path,file,json)=>{}

Added JSIO:

  • getAllowSuffix - Check allowed file suffixes for operations
  • read - Read a file and return a List<String>
  • exists - Check if a file exists
  • write - Write to a file and create parent directories
  • delete - Delete a file
  • findJSInDirectory - Can be used to find paths of all JS files in a directory

中文

KubeJSJsonIO里面添加了

  • writeAndCreateDirectories - 在写json文件的时候创建其所属的文件夹
  • findJsonInDirectory - 可以查询一个目录下面的所有json文件的路径
  • read(path,reader) - 获取path文件夹下面的全部文件,并执行reader函数
    reader:(path,file,json)=>{}

添加了JSIO

  • getAllowSuffix - 查询允许操作的文件后缀名
  • read - 读取一个文件返回List<String>
  • exists - 检测一个文件是否存在
  • write - 写入一个文件,并创建其所属的文件夹
  • delete - 删除文件
  • findJSInDirectory - 可以查询一个目录下面的所有js文件的路径

The JavaScriptJS Team

profile avatar
  • 13
    Followers
  • 29
    Projects
  • 4.9M
    Downloads

More from yiran1457View all

  • SlashBladeTetra project image

    SlashBladeTetra

    • 8.0K
    • Mods

    Allows the use of Tetra to modify SlashBlades.

    • 8.0K
    • May 13, 2026
    • Mods
  • AuraTip project image

    AuraTip

    • 77
    • Mods

    A powerful toolkit for creating highly customizable Radial Menus and Tips via Java, KubeJS, or Datapacks.

    • 77
    • May 12, 2026
    • Mods
    • +1
  • One Enough Lib project image

    One Enough Lib

    • 1.3M
    • Mods

    A Lib for simplified development of the OE series

    • 1.3M
    • May 9, 2026
    • Mods
  • FluxOfTetra project image

    FluxOfTetra

    • 80.0K
    • Mods

    Allow your modular items to be charged with FE.

    • 80.0K
    • May 2, 2026
    • Mods
  • SlashBladeTetra project image

    SlashBladeTetra

    • 8.0K
    • Mods

    Allows the use of Tetra to modify SlashBlades.

    • 8.0K
    • May 13, 2026
    • Mods
  • AuraTip project image

    AuraTip

    • 77
    • Mods

    A powerful toolkit for creating highly customizable Radial Menus and Tips via Java, KubeJS, or Datapacks.

    • 77
    • May 12, 2026
    • Mods
    • +1
  • One Enough Lib project image

    One Enough Lib

    • 1.3M
    • Mods

    A Lib for simplified development of the OE series

    • 1.3M
    • May 9, 2026
    • Mods
  • FluxOfTetra project image

    FluxOfTetra

    • 80.0K
    • Mods

    Allow your modular items to be charged with FE.

    • 80.0K
    • May 2, 2026
    • Mods