steakteam / CHFiles

A CommandHelper extension that adds file editing support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CHFiles is a CommandHelper extension that allows you to work with files and directory and interact with them from whithin your server.

Latest release: v2.2.2

Functions:

  • copy_file(FromFile, ToFile) - Copy a file (or directory) to another location, with a new name

  • create_file(PathToFile) - Create a new file

  • delete_file(PathToFile) - Delete an extension file or directory

  • list_files(PathToDirectory) - Lists all files and directories in given directory

  • rename_file(File, Name) - Rename a file.

  • write_file(PathToFile, content, [mode]) - Write text to a file. mode is optional, can be OVERWRITE or APPEND.

  • async_write_file(PathToFile, content, [mode], [callback]) - Write text to a file asynchronously. mode is optional, can be OVERWRITE or APPEND.

  • async_read_file(PathToFile, callback) - Asynchronously reads in a file. check here

  • file_exists(Path) - Check if a file exists, returns true or false

  • create_dir(PathToDir) - Create a new directory

  • is_dir(PathToFile) - if a file is directory, return true.

  • is_file(PathToFile) - if a file is not file, return false.

  • get_absolute_path([Path]) - Returns the absolute path

About

A CommandHelper extension that adds file editing support


Languages

Language:Java 100.0%