From ba5b6ca75187e18942c463f7300b49061ebdc183 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 25 Mar 2012 14:24:51 +0000 Subject: A globally-accessible OS-independent GetDirectoryContents() function for listing all objects in a folder as an AStringList git-svn-id: http://mc-server.googlecode.com/svn/trunk@433 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/StringUtils.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/StringUtils.h') diff --git a/source/StringUtils.h b/source/StringUtils.h index 8805c1d99..262c01e49 100644 --- a/source/StringUtils.h +++ b/source/StringUtils.h @@ -15,6 +15,7 @@ typedef std::string AString; typedef std::vector AStringVector; +typedef std::list AStringList; @@ -41,6 +42,10 @@ extern int NoCaseCompare(const AString & s1, const AString & s2); /// Replaces *each* occurence of iNeedle in iHayStack with iReplaceWith extern void ReplaceString(AString & iHayStack, const AString & iNeedle, const AString & iReplaceWith); +/// Returns the list of all items in the specified directory (files, folders, nix pipes, whatever's there) +extern AStringList GetDirectoryContents(const char * a_Directory); + + // If you have any other string helper functions, declare them here -- cgit v1.2.3