TkN 2.4
Toolkit for Nuclei
Loading...
Searching...
No Matches
tksystem Class Reference

Interface to the system (tested on linux and mac os) More...

Detailed Description

Interface to the system (tested on linux and mac os)

Definition at line 27 of file tksystem.h.

#include <tksystem.h>

Public Member Functions

 tksystem ()
 
virtual ~tksystem ()=default
 
int download_file (const tkstring &_filename, const tkstring &_outputdir="", bool _replace_existing=false, bool _use_filename=false)
 
bool exists (tkstring _file_name)
 
std::vector< tkstringget_list_of_files (const tkstring &_dir, const tkstring &_pattern="*")
 
tkstring get_system_command_output (tkstring command)
 
int getdir (tkstring _dir, std::vector< tkstring > &_files)
 
void list_files (const tkstring &_dir, const tkstring &_pattern)
 
int ls_dir (const tkstring &_dirname, tkstring _option="-l")
 
int make_dir (const tkstring &_dirname, bool _recursive=true)
 
int move (const tkstring &_from, const tkstring &_to)
 
int remove_dir (const tkstring &_dirname, bool _force=false)
 
int remove_file (const tkstring &_filename, bool _force=false)
 
int unzip_file (const tkstring &_filename, tkstring _outputdir="")
 

Static Public Member Functions

static tksystemthe_tksystem ()
 db_manager is a singleton
 

Constructor & Destructor Documentation

◆ tksystem()

tksystem ( )
inline

Definition at line 34 of file tksystem.h.

◆ ~tksystem()

virtual ~tksystem ( )
virtualdefault

Member Function Documentation

◆ download_file()

int download_file ( const tkstring & _filename,
const tkstring & _outputdir = "",
bool _replace_existing = false,
bool _use_filename = false )

Definition at line 150 of file tksystem.cpp.

◆ exists()

bool exists ( tkstring _file_name)

Definition at line 67 of file tksystem.cpp.

◆ get_list_of_files()

std::vector< tkstring > get_list_of_files ( const tkstring & _dir,
const tkstring & _pattern = "*" )

Definition at line 104 of file tksystem.cpp.

◆ get_system_command_output()

tkstring get_system_command_output ( tkstring command)

Definition at line 164 of file tksystem.cpp.

◆ getdir()

int getdir ( tkstring _dir,
std::vector< tkstring > & _files )

Definition at line 45 of file tksystem.cpp.

◆ list_files()

void list_files ( const tkstring & _dir,
const tkstring & _pattern )

Definition at line 96 of file tksystem.cpp.

◆ ls_dir()

int ls_dir ( const tkstring & _dirname,
tkstring _option = "-l" )

Definition at line 145 of file tksystem.cpp.

◆ make_dir()

int make_dir ( const tkstring & _dirname,
bool _recursive = true )

Definition at line 128 of file tksystem.cpp.

◆ move()

int move ( const tkstring & _from,
const tkstring & _to )

Definition at line 134 of file tksystem.cpp.

◆ remove_dir()

int remove_dir ( const tkstring & _dirname,
bool _force = false )

Definition at line 116 of file tksystem.cpp.

◆ remove_file()

int remove_file ( const tkstring & _filename,
bool _force = false )

Definition at line 122 of file tksystem.cpp.

◆ the_tksystem()

tksystem * the_tksystem ( )
static

db_manager is a singleton

Definition at line 36 of file tksystem.cpp.

◆ unzip_file()

int unzip_file ( const tkstring & _filename,
tkstring _outputdir = "" )

Definition at line 139 of file tksystem.cpp.


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