TTY OV  1
A cross platform python terminal
Loading...
Searching...
No Matches
tty_ov.hl_ls.HLLs Class Reference
Collaboration diagram for tty_ov.hl_ls.HLLs:
Collaboration graph

Public Member Functions

None __init__ (self, int success=0, int error=84)
 
bool has_colors (self, stream)
 
 get_mode_info (self, mode, filename)
 
str get_user_info (self, uid)
 
str get_group_info (self, gid)
 
int list_files (self, list files)
 
int ls (self, Union[str, list] path="")
 

Data Fields

dict colors
 
 success = success
 
 error = error
 

Detailed Description

The basics of the ls function
This code is borrowed from: https://github.com/connormason/lspython/tree/master
I :
    - fixed this code's errors
    - made it cross-platform
    - implemented it into the program
    - adapted the code to fit into the shell's functionalities

Definition at line 44 of file hl_ls.py.

Constructor & Destructor Documentation

◆ __init__()

None tty_ov.hl_ls.HLLs.__init__ ( self,
int success = 0,
int error = 84 )

Definition at line 55 of file hl_ls.py.

Member Function Documentation

◆ get_group_info()

str tty_ov.hl_ls.HLLs.get_group_info ( self,
gid )
 Get the pid of the active groupe 

Definition at line 122 of file hl_ls.py.

◆ get_mode_info()

tty_ov.hl_ls.HLLs.get_mode_info ( self,
mode,
filename )
 Get the type of document in order to apply some colour 

Definition at line 78 of file hl_ls.py.

◆ get_user_info()

str tty_ov.hl_ls.HLLs.get_user_info ( self,
uid )
 Get the info of the user 

Definition at line 113 of file hl_ls.py.

◆ has_colors()

bool tty_ov.hl_ls.HLLs.has_colors ( self,
stream )
 Check if the ncurse library is present in the system for the colour management 

Definition at line 70 of file hl_ls.py.

◆ list_files()

int tty_ov.hl_ls.HLLs.list_files ( self,
list files )
 List the files contained in the path 

Definition at line 131 of file hl_ls.py.

◆ ls()

int tty_ov.hl_ls.HLLs.ls ( self,
Union[str, list] path = "" )
A basic loop manager to make this P.O.S POC a minimum functional and feel like the core of the real ls

Definition at line 210 of file hl_ls.py.

Field Documentation

◆ colors

dict tty_ov.hl_ls.HLLs.colors
Initial value:
= {
"default": "",
"white": "\x1b[01;37m",
"gray": "\x1b[00;37m",
"purple": "\x1b[00;35m",
"cyan": "\x1b[01;36m",
"green": "\x1b[01;32m",
"red": "\x1b[01;05;37;41m"
}

Definition at line 57 of file hl_ls.py.

◆ error

tty_ov.hl_ls.HLLs.error = error

Definition at line 68 of file hl_ls.py.

◆ success

tty_ov.hl_ls.HLLs.success = success

Definition at line 67 of file hl_ls.py.


The documentation for this class was generated from the following file: