
functions
files
intro
|
|
AsciiFile.ycp
|
|
- Thomas Fehr <fehr@suse.de>
- Purpose: Handle reading and modifying of ascii files.
|
|
Global Functions
- AppendLine (map& file, list entry)
- ChangeLineField (map& file, integer line, integer field, string entry)
- FindLineField (map file, integer field, string content)
- GetLine (map& file, integer line)
- GetLines (map& file, list<integer> lines)
- NumLines (map file)
- ReadFile (map& file, string pathname)
- RemoveLines (map& file, list<integer> lines)
- ReplaceLine (map& file, integer line, list<string> entry)
- RewriteFile (map& file, string fpath)
- SetComment (map& file, string comment)
- SetDelimiter (map& file, string delim)
- SetListWidth (map& file, list widths)
Local Functions
|
|
|
|
global SetComment (map& file, string comment) -> void
|
|
Sets the string how the comment starts
- Parameters:
|
global SetListWidth (map& file, list widths) -> void
|
|
Sets the widths of records on one line
- Parameters:
|
global SetDelimiter (map& file, string delim) -> void
|
|
Sets the delimiter between the records on one line
- Parameters:
|
local AssertLineValid (map& file, integer line) -> string
|
|
Private function
- Parameters:
|
global ReadFile (map& file, string pathname) -> void
|
|
Reads the file from the disk
- Parameters:
|
global FindLineField (map file, integer field, string content) -> list<integer>
|
|
Returns the list of rows where matches searched string in the defined column
- Parameters:
- Return value:
|
global GetLines (map& file, list<integer> lines) -> map<integer, map>
|
|
Returns map of wanted lines
- Parameters:
- Return value:
|
global GetLine (map& file, integer line) -> map
|
|
Returns map of wanted line
- Parameters:
- Return value:
|
global NumLines (map file) -> integer
|
|
Returns count of lines in file
- Parameters:
- Return value:
|
global ChangeLineField (map& file, integer line, integer field, string entry) -> void
|
|
Changes the record in the file defined by row and column
- Parameters:
|
global ReplaceLine (map& file, integer line, list<string> entry) -> void
|
|
Changes a complete line
- Parameters:
|
global AppendLine (map& file, list entry) -> void
|
|
Appends a new line at the bottom
- Parameters:
|
global RemoveLines (map& file, list<integer> lines) -> void
|
|
Removes lines
- Parameters:
|
global RewriteFile (map& file, string fpath) -> void
|
|
Writes a content into the file
- Parameters:
|