|
[SOLVED] Delete Current line from file
Hi, can some one help me out
First of all, how do i call a command from a class
eg. my class is called Util and it contain all the necessary information to readFile and writeFile etc.
I want this class to call a command, so when i type delete in the console it would delete the current line in the file that has been open. the code for this i have at the moment are:
public class Delete extends Command2
{
public Delete(Buffer buffer)
{
super("delete", buffer);
}
public void execute()
{
Util util = new Util();
--> don't know what to do afterward
}
}
in the public void execute()
{
}
i want to be able to delete a current line from a file, but don't know how to implement it
help would be great
kind regards
|