📄 directory_scanner.cpp
字号:
/* $Id: directory_scanner.cpp,v 1.11 2004/01/07 18:36:53 sphair Exp $
**
** ClanLib Game SDK
** Copyright (C) 2003 The ClanLib Team
** For a total list of contributers see the file CREDITS.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
*/
#include "Core/precomp.h"
#include "API/Core/System/cl_assert.h"
#include "API/Core/IOData/directory_scanner.h"
#include "directory_scanner_generic.h"
#ifdef WIN32
#include "../Win32/directory_scanner_win32.h"
#else
#include "../Unix/directory_scanner_unix.h"
#endif
/////////////////////////////////////////////////////////////////////////////
// CL_DirectoryScanner construction:
CL_DirectoryScanner::CL_DirectoryScanner() : impl(0)
{
#ifdef WIN32
impl = new CL_DirectoryScanner_Win32();
#else
impl = new CL_DirectoryScanner_Unix();
#endif
if (impl) impl->add_ref();
}
CL_DirectoryScanner::CL_DirectoryScanner(const CL_DirectoryScanner ©) : impl(0)
{
impl = copy.impl;
if (impl) impl->add_ref();
}
CL_DirectoryScanner::~CL_DirectoryScanner()
{
if (impl) impl->release_ref();
}
/////////////////////////////////////////////////////////////////////////////
// CL_DirectoryScanner attributes:
bool CL_DirectoryScanner::scan(const std::string& pathname)
{
return impl->scan (pathname);
}
bool CL_DirectoryScanner::scan(const std::string& pathname, const std::string& pattern)
{
return impl->scan (pathname, pattern);
}
std::string CL_DirectoryScanner::get_directory_path()
{
return impl->get_directory_path();
}
int CL_DirectoryScanner::get_size()
{
return impl->get_size();
}
std::string CL_DirectoryScanner::get_name()
{
return impl->get_name();
}
std::string CL_DirectoryScanner::get_pathname()
{
return impl->get_pathname();
}
bool CL_DirectoryScanner::is_directory()
{
return impl->is_directory();
}
bool CL_DirectoryScanner::is_hidden()
{
return impl->is_hidden();
}
bool CL_DirectoryScanner::is_readable()
{
return impl->is_readable();
}
bool CL_DirectoryScanner::is_writable()
{
return impl->is_writable();
}
/////////////////////////////////////////////////////////////////////////////
// CL_DirectoryScanner operations:
bool CL_DirectoryScanner::next()
{
return impl->next();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -