|
SAGA API Version 9.12
|
#include <wx/utils.h>#include <wx/filename.h>#include <wx/dir.h>#include <wx/wxcrtvararg.h>#include <wx/wfstream.h>#include <wx/txtstrm.h>#include <wx/zipstrm.h>#include <wx/tarstrm.h>#include <wx/zstream.h>#include <wx/log.h>#include <wx/version.h>#include "api_core.h"Go to the source code of this file.
Macros | |
| #define | m_pStream_Base ((wxStreamBase *)m_pStream) |
| #define | m_pStream_I ((wxFFileInputStream *)m_pStream) |
| #define | m_pStream_O ((wxFFileOutputStream *)m_pStream) |
| #define | m_pStream_IO ((wxFFileStream *)m_pStream) |
| #define | UNZIP_BUFFER 4096 |
Functions | |
| bool | SG_Dir_Exists (const CSG_String &Directory) |
| bool | SG_Dir_Create (const CSG_String &Directory, bool bFullPath) |
| bool | SG_Dir_Delete (const CSG_String &Directory, bool bRecursive) |
| CSG_String | SG_Dir_Get_Current (void) |
| bool | SG_Dir_Set_Temp (const CSG_String &Directory, bool bCreate) |
| Set the directory path returned by SG_Dir_Get_Temp(). Defaults to the user's temporary directory. To restore the default simply call the function with an empty directory string. | |
| CSG_String | SG_Dir_Get_Temp (void) |
| bool | SG_Dir_List_Subdirectories (CSG_Strings &List, const CSG_String &Directory, bool bRecursive) |
| bool | SG_Dir_List_Files (CSG_Strings &List, const CSG_String &Directory, const CSG_String &Extension, bool bRecursive) |
| bool | SG_File_Exists (const CSG_String &FileName) |
| bool | SG_File_Delete (const CSG_String &FileName) |
| bool | SG_File_Copy (const CSG_String &Source, const CSG_String &Target, bool bOverwrite) |
| CSG_String | SG_File_Get_Name_Temp (const CSG_String &Prefix) |
| CSG_String | SG_File_Get_Name_Temp (const CSG_String &Prefix, const CSG_String &Directory) |
| CSG_String | SG_File_Get_Name (const CSG_String &full_Path, bool bExtension) |
| CSG_String | SG_File_Get_Path (const CSG_String &full_Path) |
| CSG_String | SG_File_Get_Path_Absolute (const CSG_String &full_Path, const CSG_String &CWD) |
| CSG_String | SG_File_Get_Path_Relative (const CSG_String &Directory, const CSG_String &full_Path) |
| CSG_String | SG_File_Make_Path (const CSG_String &Directory, const CSG_String &Name) |
| CSG_String | SG_File_Make_Path (const CSG_String &Directory, const CSG_String &Name, const CSG_String &Extension) |
| bool | SG_File_Cmp_Path (const CSG_String &Path1, const CSG_String &Path2) |
| bool | SG_File_Cmp_Extension (const CSG_String &FileName, const CSG_String &Extension) |
| bool | SG_File_Set_Extension (CSG_String &FileName, const CSG_String &Extension) |
| CSG_String | SG_File_Get_Extension (const CSG_String &FileName) |
| bool | SG_Get_Environment (const CSG_String &Variable, CSG_String *Value) |
| bool | SG_Set_Environment (const CSG_String &Variable, const CSG_String &Value) |
Variables | |
| CSG_String | g_Dir_Temp |
| #define m_pStream_Base ((wxStreamBase *)m_pStream) |
Definition at line 75 of file api_file.cpp.
Referenced by CSG_File::Close(), CSG_File::Length(), CSG_Archive::Open(), and CSG_File::Open().
| #define m_pStream_I ((wxFFileInputStream *)m_pStream) |
Definition at line 76 of file api_file.cpp.
Referenced by CSG_File::is_EOF(), CSG_File::Read(), CSG_File::Read_Char(), CSG_File::Read_Line(), CSG_File::Seek(), and CSG_File::Tell().
| #define m_pStream_IO ((wxFFileStream *)m_pStream) |
Definition at line 78 of file api_file.cpp.
Referenced by CSG_File::is_EOF(), CSG_File::Read(), CSG_File::Read_Char(), CSG_File::Read_Line(), CSG_File::Seek(), CSG_File::Tell(), and CSG_File::Write().
| #define m_pStream_O ((wxFFileOutputStream *)m_pStream) |
Definition at line 77 of file api_file.cpp.
Referenced by CSG_File::Flush(), CSG_File::Seek(), CSG_File::Tell(), and CSG_File::Write().
| #define UNZIP_BUFFER 4096 |
Referenced by CSG_Archive::Extract().
| bool SG_Dir_Create | ( | const CSG_String & | Directory, |
| bool | bFullPath ) |
Definition at line 982 of file api_file.cpp.
References CSG_String::c_str(), and SG_Dir_Exists().
Referenced by CSG_Tool_Library_Manager::Create_Python_ToolBox(), CSG_Archive::Extract_All(), CSG_Tool_Library_Manager::Get_Summary(), and SG_Dir_Set_Temp().
| bool SG_Dir_Delete | ( | const CSG_String & | Directory, |
| bool | bRecursive ) |
Definition at line 993 of file api_file.cpp.
References CSG_String::c_str(), and SG_Dir_Exists().
| bool SG_Dir_Exists | ( | const CSG_String & | Directory | ) |
Definition at line 976 of file api_file.cpp.
References CSG_String::c_str(), and CSG_String::is_Empty().
Referenced by CSG_Tool_Library_Manager::Create_Python_ToolBox(), CSG_Archive::Extract_All(), CSG_Tool::Load_Description(), CSG_Tool_Library::Load_Description(), CSG_Archive::Open(), CSG_File::Open(), SG_Dir_Create(), SG_Dir_Delete(), SG_Dir_Get_Temp(), SG_Dir_Set_Temp(), SG_File_Get_Name_Temp(), SG_Grid_Cache_Set_Directory(), and SG_Initialize_Environment().
| CSG_String SG_Dir_Get_Current | ( | void | ) |
Definition at line 1004 of file api_file.cpp.
| CSG_String SG_Dir_Get_Temp | ( | void | ) |
Definition at line 1047 of file api_file.cpp.
References g_Dir_Temp, and SG_Dir_Exists().
| bool SG_Dir_List_Files | ( | CSG_Strings & | List, |
| const CSG_String & | Directory, | ||
| const CSG_String & | Extension, | ||
| bool | bRecursive ) |
Definition at line 1087 of file api_file.cpp.
References CSG_String::c_str(), CSG_Strings::Clear(), CSG_Strings::Get_Count(), CSG_String::is_Empty(), SG_Dir_List_Files(), SG_File_Cmp_Extension(), and SG_File_Make_Path().
Referenced by CSG_Tool_Library_Manager::Create_Python_ToolBox(), and SG_Dir_List_Files().
| bool SG_Dir_List_Subdirectories | ( | CSG_Strings & | List, |
| const CSG_String & | Directory, | ||
| bool | bRecursive ) |
Definition at line 1060 of file api_file.cpp.
References CSG_String::c_str(), CSG_Strings::Clear(), CSG_Strings::Get_Count(), SG_Dir_List_Subdirectories(), and SG_File_Make_Path().
Referenced by SG_Dir_List_Subdirectories().
| bool SG_Dir_Set_Temp | ( | const CSG_String & | Directory, |
| bool | bCreate ) |
Set the directory path returned by SG_Dir_Get_Temp(). Defaults to the user's temporary directory. To restore the default simply call the function with an empty directory string.
| Directory | Temporary directory |
| bCreate | Create directory if it does not exist |
Definition at line 1023 of file api_file.cpp.
References g_Dir_Temp, CSG_String::is_Empty(), SG_Dir_Create(), and SG_Dir_Exists().
| bool SG_File_Cmp_Extension | ( | const CSG_String & | FileName, |
| const CSG_String & | Extension ) |
Definition at line 1235 of file api_file.cpp.
References SG_File_Get_Extension().
Referenced by CSG_Data_Manager::Add(), CSG_Tool_Library_Manager::Add_Library(), CSG_Grid_File_Info::Create(), CSG_Shapes::Create(), CSG_Tool_Chain::Create(), CSG_PointCloud::Get_Header_Content(), CSG_MetaData::Load(), CSG_Table::Load(), CSG_Archive::Open(), CSG_Grid::Save(), CSG_Grids::Save(), CSG_PointCloud::Save(), CSG_Shapes::Save(), CSG_Table::Save(), and SG_Dir_List_Files().
| bool SG_File_Cmp_Path | ( | const CSG_String & | Path1, |
| const CSG_String & | Path2 ) |
Definition at line 1227 of file api_file.cpp.
References CSG_String::c_str().
| bool SG_File_Copy | ( | const CSG_String & | Source, |
| const CSG_String & | Target, | ||
| bool | bOverwrite ) |
Definition at line 1140 of file api_file.cpp.
References CSG_String::wx_str().
| bool SG_File_Delete | ( | const CSG_String & | FileName | ) |
Definition at line 1134 of file api_file.cpp.
References CSG_String::c_str(), and SG_File_Exists().
Referenced by CSG_Tool_Library_Manager::Create_Python_ToolBox(), CSG_Data_Object::Delete(), CSG_Grid::On_Delete(), CSG_Grids::On_Delete(), CSG_PointCloud::On_Delete(), CSG_Shapes::On_Delete(), CSG_Table::On_Delete(), and CSG_Projection::Save().
| bool SG_File_Exists | ( | const CSG_String & | FileName | ) |
Definition at line 1128 of file api_file.cpp.
References CSG_String::c_str().
Referenced by CSG_Parameter_List::_Serialize(), CSG_Tool_Library_Manager::Add_Library(), CSG_ZLib::Compress(), CSG_Projections::Create(), CSG_Table::Create(), CSG_Translator::Create(), CSG_Tool_Library_Manager::Create_Python_ToolBox(), CSG_Data_Collection::Delete(), CSG_Data_Object::Delete(), CSG_MetaData::Load(), CSG_Table::Load(), CSG_Shapes::On_Reload(), CSG_Archive::Open(), CSG_File::Open(), CSG_Data_Object::Reload(), CSG_Projection::Save(), SG_File_Delete(), and CSG_ZLib::Uncompress().
| CSG_String SG_File_Get_Extension | ( | const CSG_String & | FileName | ) |
Definition at line 1260 of file api_file.cpp.
References CSG_String::c_str().
Referenced by CSG_Data_Object::Load_MetaData(), CSG_Grid::Save(), and SG_File_Cmp_Extension().
| CSG_String SG_File_Get_Name | ( | const CSG_String & | full_Path, |
| bool | bExtension ) |
Definition at line 1162 of file api_file.cpp.
References CSG_String::c_str().
Referenced by CSG_Grid_File_Info::Create(), CSG_Tool_Library_Interface::Create(), CSG_PointCloud::Get_Header_Content(), CSG_Table::Load(), CSG_PointCloud::Save(), CSG_Tool_Chain::Save_History_to_Model(), CSG_Data_Object::Set_File_Name(), SG_File_Make_Path(), and CSG_ZLib::Uncompress().
| CSG_String SG_File_Get_Name_Temp | ( | const CSG_String & | Prefix | ) |
Definition at line 1146 of file api_file.cpp.
References SG_File_Get_Name_Temp().
Referenced by SG_File_Get_Name_Temp().
| CSG_String SG_File_Get_Name_Temp | ( | const CSG_String & | Prefix, |
| const CSG_String & | Directory ) |
Definition at line 1151 of file api_file.cpp.
References CSG_String::c_str(), SG_Dir_Exists(), and SG_File_Make_Path().
| CSG_String SG_File_Get_Path | ( | const CSG_String & | full_Path | ) |
Definition at line 1175 of file api_file.cpp.
References CSG_String::c_str().
Referenced by CSG_Grid_File_Info::Create(), CSG_Archive::Extract(), CSG_Archive::Extract_All(), CSG_Tool_Library_Manager::Get_Summary(), CSG_Archive::Open(), CSG_File::Open(), SG_File_Make_Path(), SG_UI_Get_Application_Path(), and CSG_ZLib::Uncompress().
| CSG_String SG_File_Get_Path_Absolute | ( | const CSG_String & | full_Path, |
| const CSG_String & | CWD ) |
Definition at line 1183 of file api_file.cpp.
References CSG_String::c_str().
Referenced by CSG_Tool_Library_Interface::Create(), CSG_Tool_Library::CSG_Tool_Library(), CSG_Text_Format_Converter::Html_Absolute_Image_Paths(), and SG_UI_Get_Application_Path().
| CSG_String SG_File_Get_Path_Relative | ( | const CSG_String & | Directory, |
| const CSG_String & | full_Path ) |
Definition at line 1193 of file api_file.cpp.
References CSG_String::c_str().
| CSG_String SG_File_Make_Path | ( | const CSG_String & | Directory, |
| const CSG_String & | Name ) |
Definition at line 1203 of file api_file.cpp.
References SG_File_Make_Path().
Referenced by CSG_Tool_Library_Manager::Add_Default_Libraries(), CSG_Tool_Library_Manager::Add_Directory(), CSG_Grid_File_Info::Create(), CSG_Projections::Create(), CSG_Translator::Create(), CSG_Tool_Library_Manager::Create_Python_ToolBox(), CSG_Tool_Chains::CSG_Tool_Chains(), CSG_Archive::Extract(), CSG_Tool_Library::Get_Summary(), CSG_Tool_Library_Manager::Get_Summary(), CSG_MetaData::Load(), CSG_Tool::Load_Description(), CSG_Tool_Library::Load_Description(), CSG_MetaData::Save(), CSG_PointCloud::Save(), CSG_Grid::Set_Cache(), SG_Dir_List_Files(), SG_Dir_List_Subdirectories(), SG_File_Get_Name_Temp(), SG_File_Make_Path(), SG_FTP_Download(), and CSG_ZLib::Uncompress().
| CSG_String SG_File_Make_Path | ( | const CSG_String & | Directory, |
| const CSG_String & | Name, | ||
| const CSG_String & | Extension ) |
Definition at line 1208 of file api_file.cpp.
References CSG_String::c_str(), CSG_String::is_Empty(), SG_File_Get_Name(), and SG_File_Get_Path().
| bool SG_File_Set_Extension | ( | CSG_String & | FileName, |
| const CSG_String & | Extension ) |
Definition at line 1241 of file api_file.cpp.
References CSG_String::c_str(), and CSG_String::Length().
Referenced by CSG_Data_Object::Delete(), CSG_Data_Object::Load_MetaData(), CSG_Grid::On_Delete(), CSG_Grids::On_Delete(), CSG_Shapes::On_Delete(), CSG_PointCloud::Save(), and CSG_Data_Object::Save_MetaData().
| bool SG_Get_Environment | ( | const CSG_String & | Variable, |
| CSG_String * | Value ) |
Definition at line 1275 of file api_file.cpp.
References CSG_String::w_str().
Referenced by CSG_Tool_Library_Manager::Add_Default_Libraries().
| bool SG_Set_Environment | ( | const CSG_String & | Variable, |
| const CSG_String & | Value ) |
Definition at line 1295 of file api_file.cpp.
References CSG_String::w_str().
| CSG_String g_Dir_Temp |
Definition at line 1012 of file api_file.cpp.
Referenced by SG_Dir_Get_Temp(), and SG_Dir_Set_Temp().