From 81eef38929f43adb031985ec303d73c8b61cf67f Mon Sep 17 00:00:00 2001 From: prozacx Date: Wed, 8 Feb 2006 08:41:45 +0000 Subject: [PATCH] Made some helper funcs const git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@619 726aef4b-f618-498e-8847-2d620e286838 --- FileUtils.cpp | 14 +++++++------- FileUtils.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/FileUtils.cpp b/FileUtils.cpp index ef2101ce..73bc7d5d 100644 --- a/FileUtils.cpp +++ b/FileUtils.cpp @@ -42,13 +42,13 @@ bool CFile::IsFifo(const CString& sLongName, bool bUseLstat) { return CFile::FT bool CFile::IsLnk(const CString& sLongName, bool bUseLstat) { return CFile::FType(sLongName, FT_LINK, bUseLstat); } bool CFile::IsSock(const CString& sLongName, bool bUseLstat) { return CFile::FType(sLongName, FT_SOCK, bUseLstat); } -bool CFile::IsReg(bool bUseLstat) { return CFile::IsReg(m_sLongName, bUseLstat); } -bool CFile::IsDir(bool bUseLstat) { return CFile::IsDir(m_sLongName, bUseLstat); } -bool CFile::IsChr(bool bUseLstat) { return CFile::IsChr(m_sLongName, bUseLstat); } -bool CFile::IsBlk(bool bUseLstat) { return CFile::IsBlk(m_sLongName, bUseLstat); } -bool CFile::IsFifo(bool bUseLstat) { return CFile::IsFifo(m_sLongName, bUseLstat); } -bool CFile::IsLnk(bool bUseLstat) { return CFile::IsLnk(m_sLongName, bUseLstat); } -bool CFile::IsSock(bool bUseLstat) { return CFile::IsSock(m_sLongName, bUseLstat); } +bool CFile::IsReg(bool bUseLstat) const { return CFile::IsReg(m_sLongName, bUseLstat); } +bool CFile::IsDir(bool bUseLstat) const { return CFile::IsDir(m_sLongName, bUseLstat); } +bool CFile::IsChr(bool bUseLstat) const { return CFile::IsChr(m_sLongName, bUseLstat); } +bool CFile::IsBlk(bool bUseLstat) const { return CFile::IsBlk(m_sLongName, bUseLstat); } +bool CFile::IsFifo(bool bUseLstat) const { return CFile::IsFifo(m_sLongName, bUseLstat); } +bool CFile::IsLnk(bool bUseLstat) const { return CFile::IsLnk(m_sLongName, bUseLstat); } +bool CFile::IsSock(bool bUseLstat) const { return CFile::IsSock(m_sLongName, bUseLstat); } bool CFile::access(int mode) { return (::access(m_sLongName.c_str(), mode) == 0); } diff --git a/FileUtils.h b/FileUtils.h index 02054f19..c2c300d7 100644 --- a/FileUtils.h +++ b/FileUtils.h @@ -48,13 +48,13 @@ public: static bool IsLnk(const CString& sLongName, bool bUseLstat = true); static bool IsSock(const CString& sLongName, bool bUseLstat = false); - bool IsReg(bool bUseLstat = false); - bool IsDir(bool bUseLstat = false); - bool IsChr(bool bUseLstat = false); - bool IsBlk(bool bUseLstat = false); - bool IsFifo(bool bUseLstat = false); - bool IsLnk(bool bUseLstat = true); - bool IsSock(bool bUseLstat = false); + bool IsReg(bool bUseLstat = false) const; + bool IsDir(bool bUseLstat = false) const; + bool IsChr(bool bUseLstat = false) const; + bool IsBlk(bool bUseLstat = false) const; + bool IsFifo(bool bUseLstat = false) const; + bool IsLnk(bool bUseLstat = true) const; + bool IsSock(bool bUseLstat = false) const; bool access(int mode);