d41673218e
- aggiornamento prototipi.
48 lines
2.4 KiB
C++
48 lines
2.4 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2026
|
|
//----------------------------------------------------------------------------
|
|
// File : EGnFileUtils.h Data : 09.01.26 Versione : 3.1a1
|
|
// Contenuto : Prototipi funzioni di utilità su file e direttori.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 11.12.13 DS Creazione modulo.
|
|
// 09.04.22 DS Aggiunta FindAllFiles.
|
|
// 09.01.26 DS Aggiunta EraseNonEmptyDirectory.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EgtStringBase.h"
|
|
|
|
|
|
//----------------------- Macro per import/export ----------------------------
|
|
#undef EGN_EXPORT
|
|
#if defined( I_AM_EGN) // da definirsi solo nella DLL
|
|
#define EGN_EXPORT __declspec( dllexport)
|
|
#else
|
|
#define EGN_EXPORT __declspec( dllimport)
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
EGN_EXPORT bool ExistsFile( const std::string& sFile) ;
|
|
EGN_EXPORT bool CopyFileEgt( const std::string& sFile, const std::string& sNewFile) ;
|
|
EGN_EXPORT bool RenameFile( const std::string& sFile, const std::string& sNewFile) ;
|
|
EGN_EXPORT bool EraseFile( const std::string& sFile) ;
|
|
EGN_EXPORT bool CompareFilesLastWriteTime( const std::string& sFile1, const std::string& sFile2, int& nRes) ;
|
|
EGN_EXPORT std::string GetFileExtension( const std::string& sFile) ;
|
|
EGN_EXPORT std::string ChangeFileExtension( const std::string& sFile, const std::string& sNewExt) ;
|
|
EGN_EXPORT bool FileExtensionMatches( const std::string& sFile, const std::string& sExt) ;
|
|
EGN_EXPORT bool FindFirstFileEgt( const std::string& sFileSpec, std::string& sFileName) ;
|
|
EGN_EXPORT bool FindAllFiles( const std::string& sFileSpec, STRVECTOR& vsFileNames) ;
|
|
EGN_EXPORT std::string GetFileName( const std::string& sPath) ;
|
|
EGN_EXPORT std::string GetFileTitleEgt( const std::string& sPath) ;
|
|
EGN_EXPORT std::string GetDirectory( const std::string& sPath) ;
|
|
EGN_EXPORT bool ExistsDirectory( const std::string& sDir) ;
|
|
EGN_EXPORT bool CreateDirectoryEgt( const std::string& sDir) ;
|
|
EGN_EXPORT bool EmptyDirectory( const std::string& sDir) ;
|
|
EGN_EXPORT bool EraseDirectory( const std::string& sDir) ;
|
|
EGN_EXPORT bool EraseNonEmptyDirectory( const std::string& sDir) ;
|
|
EGN_EXPORT bool FindAllDirectories( const std::string& sDirSpec, STRVECTOR& vsDirNames) ;
|