KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIPLATFORM::ENV Namespace Reference

Classes

struct  PROXY_CONFIG
 

Functions

void Init ()
 Perform environment initialization tasks.
 
bool MoveToTrash (const wxString &aPath, wxString &aError)
 Move the specified file/directory to the trash bin/recycle bin.
 
bool IsNetworkPath (const wxString &aPath)
 Determines if a given path is a network shared file apth On Windows for example, any form of path is accepted drive map or UNC.
 
wxString GetDocumentsPath ()
 Retrieves the operating system specific path for a user's documents.
 
wxString GetUserConfigPath ()
 Retrieves the operating system specific path for a user's configuration store.
 
wxString GetUserDataPath ()
 Retrieves the operating system specific path for a user's data store.
 
wxString GetUserLocalDataPath ()
 Retrieves the operating system specific path for a user's local data store.
 
wxString GetUserCachePath ()
 Retrieves the operating system specific path for user's application cache.
 
bool GetSystemProxyConfig (const wxString &aURL, PROXY_CONFIG &aCfg)
 Retrieves platform level proxying requirements to reach the given url.
 
bool VerifyFileSignature (const wxString &aPath)
 Validates the code signing signature of a given file This is most likely only ever going to be applicable to Windows.
 

Function Documentation

◆ GetDocumentsPath()

wxString KIPLATFORM::ENV::GetDocumentsPath ( )

Retrieves the operating system specific path for a user's documents.

Returns
User documents path

Definition at line 77 of file gtk/environment.cpp.

Referenced by DIALOG_PLOT_SCHEMATIC::getOutputPath(), PATHS::getUserDocumentPath(), SCH_IO_LTSPICE::LoadSchematicFile(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), and SystemDirsAppend().

◆ GetSystemProxyConfig()

bool KIPLATFORM::ENV::GetSystemProxyConfig ( const wxString &  aURL,
PROXY_CONFIG aCfg 
)

Retrieves platform level proxying requirements to reach the given url.

Parameters
aURLThe target url we will be requesting over http
aCfgThe proxy config struct that will be populated
Returns
True if successful fetched proxy info

Definition at line 121 of file gtk/environment.cpp.

Referenced by KICAD_CURL_EASY::SetURL().

◆ GetUserCachePath()

wxString KIPLATFORM::ENV::GetUserCachePath ( )

Retrieves the operating system specific path for user's application cache.

Returns
User cache path

Definition at line 115 of file gtk/environment.cpp.

Referenced by PATHS::GetUserCachePath().

◆ GetUserConfigPath()

wxString KIPLATFORM::ENV::GetUserConfigPath ( )

Retrieves the operating system specific path for a user's configuration store.

Returns
User config path

Definition at line 97 of file gtk/environment.cpp.

Referenced by PATHS::CalculateUserSettingsPath(), PROJECT::libTableName(), and DIALOG_GLOBAL_LIB_TABLE_CONFIG::TransferDataToWindow().

◆ GetUserDataPath()

wxString KIPLATFORM::ENV::GetUserDataPath ( )

Retrieves the operating system specific path for a user's data store.

Returns
User config path

Definition at line 103 of file gtk/environment.cpp.

Referenced by SCH_IO_LTSPICE::LoadSchematicFile().

◆ GetUserLocalDataPath()

wxString KIPLATFORM::ENV::GetUserLocalDataPath ( )

Retrieves the operating system specific path for a user's local data store.

Returns
User config path

Definition at line 109 of file gtk/environment.cpp.

Referenced by SCH_IO_LTSPICE::LoadSchematicFile().

◆ Init()

void KIPLATFORM::ENV::Init ( )

Perform environment initialization tasks.

These tasks are called during the wxApp constructor and therefore won't have access to the underlying OS application.

Definition at line 29 of file gtk/environment.cpp.

Referenced by APP_KICAD::APP_KICAD(), APP_KICAD_CLI::APP_KICAD_CLI(), and APP_SINGLE_TOP::APP_SINGLE_TOP().

◆ IsNetworkPath()

bool KIPLATFORM::ENV::IsNetworkPath ( const wxString &  aPath)

Determines if a given path is a network shared file apth On Windows for example, any form of path is accepted drive map or UNC.

Parameters
aPathis any kind of file path to be tested
Returns
true if given path is on a network location

Definition at line 70 of file gtk/environment.cpp.

Referenced by PROJECT_TREE_PANE::FileWatcherReset().

◆ MoveToTrash()

bool KIPLATFORM::ENV::MoveToTrash ( const wxString &  aPath,
wxString &  aError 
)

Move the specified file/directory to the trash bin/recycle bin.

Parameters
aPathis the absolute path of the file/directory to move to the trash
aErroris the error message saying why the operation failed
Returns
true if the operation succeeds, false if it fails (see the contents of aError)

Definition at line 52 of file gtk/environment.cpp.

Referenced by PROJECT_TREE_ITEM::Delete().

◆ VerifyFileSignature()

bool KIPLATFORM::ENV::VerifyFileSignature ( const wxString &  aPath)

Validates the code signing signature of a given file This is most likely only ever going to be applicable to Windows.

Returns
True if file signature passes

Definition at line 127 of file gtk/environment.cpp.

Referenced by KIWAY::KiFACE().