Package io.codemodder.plugins.llm
Interface FileDescription
public interface FileDescription
Provides a set of useful methods to simplify working with the files.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the file as a single string, but with each line prefixed with the line number, starting with 1.static FileDescription
Returns the file's charset.Returns the file name.getLines()
Returns the file as a list of lines.Returns the file's preferred line separator by locating the first line separator and assuming "\n" if none are found.
-
Method Details
-
getFileName
String getFileName()Returns the file name. -
getCharset
Charset getCharset()Returns the file's charset. Assumed to be UTF-8 if none can be detected. -
getLineSeparator
String getLineSeparator()Returns the file's preferred line separator by locating the first line separator and assuming "\n" if none are found. -
getLines
Returns the file as a list of lines. -
formatLinesWithLineNumbers
String formatLinesWithLineNumbers()Return the file as a single string, but with each line prefixed with the line number, starting with 1. -
from
-