Api/dev: Difference between revisions

From Minux Wiki
Jump to navigation Jump to search
No edit summary
Tags: Reverted Visual edit
No edit summary
Tags: Reverted Visual edit
Line 30: Line 30:


[[Api/dev.printline()|dev.printline()]] - retrieves a specific line from a file
[[Api/dev.printline()|dev.printline()]] - retrieves a specific line from a file
[[Api/dev.removeline()|dev.removeline()]] - removes a particular line number from a file
[[Api/dev.removestring()|dev.removestring()]] - removes the lines containing a string from a file
[[Api/dev.replaceline()|dev.replaceline()]] - replaces a line containing a string from a file.

Revision as of 23:25, 3 October 2024

the dev api is part of the devlib package and is used to manipulate devices.


terminal options:

dev.colortranslate() - used by other api's to translate color codes

dev.colorset() - set text and background colors for following prints

dev.colorreset() - reset the terminal colors

dev.colorprint() - prints a single string in color

dev.colorwrite() - writes a single string in color


printer options:

dev.printfile()


File and string options:

dev.countline() - used to count how many lines a files has

dev.findline() - used to check if a string is present in a file

dev.findfile() - searches for a file or folder name on the disk

dev.printline() - retrieves a specific line from a file

dev.removeline() - removes a particular line number from a file

dev.removestring() - removes the lines containing a string from a file

dev.replaceline() - replaces a line containing a string from a file.