SAGA API  v9.6
api_file.cpp File Reference
#include <wx/utils.h>
#include <wx/filename.h>
#include <wx/dir.h>
#include <wx/wxcrtvararg.h>
#include <wx/wfstream.h>
#include <wx/zipstrm.h>
#include <wx/txtstrm.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)
 

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)
 
CSG_String SG_Dir_Get_Temp (void)
 
bool SG_Dir_List_Subdirectories (CSG_Strings &List, const CSG_String &Directory)
 
bool SG_Dir_List_Files (CSG_Strings &List, const CSG_String &Directory)
 
bool SG_Dir_List_Files (CSG_Strings &List, const CSG_String &Directory, const CSG_String &Extension)
 
bool SG_File_Exists (const CSG_String &FileName)
 
bool SG_File_Delete (const CSG_String &FileName)
 
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)
 
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)
 

Macro Definition Documentation

◆ m_pStream_Base

#define m_pStream_Base   ((wxStreamBase *)m_pStream)

Definition at line 73 of file api_file.cpp.

◆ m_pStream_I

#define m_pStream_I   ((wxFFileInputStream *)m_pStream)

Definition at line 74 of file api_file.cpp.

◆ m_pStream_IO

#define m_pStream_IO   ((wxFFileStream *)m_pStream)

Definition at line 76 of file api_file.cpp.

◆ m_pStream_O

#define m_pStream_O   ((wxFFileOutputStream *)m_pStream)

Definition at line 75 of file api_file.cpp.

Function Documentation

◆ SG_Dir_Create()

bool SG_Dir_Create ( const CSG_String Directory,
bool  bFullPath 
)

◆ SG_Dir_Delete()

bool SG_Dir_Delete ( const CSG_String Directory,
bool  bRecursive 
)

Definition at line 760 of file api_file.cpp.

References CSG_String::c_str(), and SG_Dir_Exists().

◆ SG_Dir_Exists()

◆ SG_Dir_Get_Current()

CSG_String SG_Dir_Get_Current ( void  )

Definition at line 771 of file api_file.cpp.

◆ SG_Dir_Get_Temp()

CSG_String SG_Dir_Get_Temp ( void  )

Definition at line 779 of file api_file.cpp.

◆ SG_Dir_List_Files() [1/2]

bool SG_Dir_List_Files ( CSG_Strings List,
const CSG_String Directory 
)

Definition at line 811 of file api_file.cpp.

Referenced by CSG_Tool_Library_Manager::Create_Python_ToolBox().

◆ SG_Dir_List_Files() [2/2]

bool SG_Dir_List_Files ( CSG_Strings List,
const CSG_String Directory,
const CSG_String Extension 
)

◆ SG_Dir_List_Subdirectories()

bool SG_Dir_List_Subdirectories ( CSG_Strings List,
const CSG_String Directory 
)

◆ SG_File_Cmp_Extension()

◆ SG_File_Cmp_Path()

bool SG_File_Cmp_Path ( const CSG_String Path1,
const CSG_String Path2 
)

Definition at line 944 of file api_file.cpp.

References CSG_String::c_str().

◆ SG_File_Delete()

◆ SG_File_Exists()

◆ SG_File_Get_Extension()

CSG_String SG_File_Get_Extension ( const CSG_String FileName)

Definition at line 977 of file api_file.cpp.

References CSG_String::c_str().

Referenced by CSG_Data_Object::Load_MetaData(), and SG_File_Cmp_Extension().

◆ SG_File_Get_Name()

◆ SG_File_Get_Name_Temp() [1/2]

CSG_String SG_File_Get_Name_Temp ( const CSG_String Prefix)

Definition at line 862 of file api_file.cpp.

◆ SG_File_Get_Name_Temp() [2/2]

CSG_String SG_File_Get_Name_Temp ( const CSG_String Prefix,
const CSG_String Directory 
)

Definition at line 867 of file api_file.cpp.

References CSG_String::c_str(), SG_Dir_Exists(), and SG_File_Make_Path().

◆ SG_File_Get_Path()

◆ SG_File_Get_Path_Absolute()

CSG_String SG_File_Get_Path_Absolute ( const CSG_String full_Path)

◆ SG_File_Get_Path_Relative()

CSG_String SG_File_Get_Path_Relative ( const CSG_String Directory,
const CSG_String full_Path 
)

Definition at line 909 of file api_file.cpp.

References CSG_String::c_str().

◆ SG_File_Make_Path() [1/2]

◆ SG_File_Make_Path() [2/2]

CSG_String SG_File_Make_Path ( const CSG_String Directory,
const CSG_String Name,
const CSG_String Extension 
)

◆ SG_File_Set_Extension()

◆ SG_Get_Environment()

bool SG_Get_Environment ( const CSG_String Variable,
CSG_String Value 
)

Definition at line 992 of file api_file.cpp.

References CSG_String::w_str().

Referenced by CSG_Tool_Library_Manager::Add_Default_Libraries().

◆ SG_Set_Environment()

bool SG_Set_Environment ( const CSG_String Variable,
const CSG_String Value 
)

Definition at line 1012 of file api_file.cpp.

References CSG_String::w_str().