mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Remove readdir.cpp & h
Unused
This commit is contained in:
@@ -24,7 +24,6 @@ set(SGPSrc
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/PCX.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/PCX.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/PngLoader.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/PngLoader.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Random.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Random.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/readdir.cpp"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/RegInst.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/RegInst.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/sgp.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/sgp.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/sgp_logger.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/sgp_logger.cpp"
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
//
|
|
||||||
// Snap: Implementation of the TReadDir class
|
|
||||||
// This class reads the contents of a directory file-by-file
|
|
||||||
//
|
|
||||||
#include "readdir.h"
|
|
||||||
|
|
||||||
TReadDir::TReadDir(char const* searchPattern)
|
|
||||||
{
|
|
||||||
fSearchHandle = FindFirstFile(searchPattern, &fFileInfo);
|
|
||||||
fFirstRequest = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool TReadDir::NextFile(char const* &fileName, unsigned &attrib)
|
|
||||||
{
|
|
||||||
if (fSearchHandle == INVALID_HANDLE_VALUE) return false;
|
|
||||||
if (fFirstRequest) fFirstRequest = false;
|
|
||||||
else if ( !FindNextFile(fSearchHandle, &fFileInfo) ) return false;
|
|
||||||
fileName = fFileInfo.cFileName;
|
|
||||||
attrib = fFileInfo.dwFileAttributes;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
//
|
|
||||||
// Snap: Declaration of the TReadDir class
|
|
||||||
// This class reads the contents of a directory file-by-file
|
|
||||||
//
|
|
||||||
#ifndef READDIR_H
|
|
||||||
#define READDIR_H
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
class TReadDir {
|
|
||||||
public:
|
|
||||||
|
|
||||||
TReadDir(char const* searchPattern);
|
|
||||||
|
|
||||||
~TReadDir() { FindClose(fSearchHandle); }
|
|
||||||
|
|
||||||
bool NextFile(char const* &fileName, unsigned &attrib);
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
HANDLE fSearchHandle;
|
|
||||||
WIN32_FIND_DATA fFileInfo;
|
|
||||||
bool fFirstRequest;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // #ifndef READDIR_H
|
|
||||||
Reference in New Issue
Block a user