summaryrefslogtreecommitdiff
path: root/src/KM_fileio.h
diff options
context:
space:
mode:
authormikey <mikey@cinecert.com>2014-04-29 15:31:21 +0000
committermikey <>2014-04-29 15:31:21 +0000
commitdd03f3ae2c71df2c4eb89804293e621777a050cf (patch)
tree1e26fd0dab7c97aa82ce03f284ae449f0bb87b47 /src/KM_fileio.h
parent5fae5df9b1cf2990b0383e1b633bdab4476a9669 (diff)
added a note about AS-02 support.
Diffstat (limited to 'src/KM_fileio.h')
-rwxr-xr-xsrc/KM_fileio.h41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/KM_fileio.h b/src/KM_fileio.h
index 46e2000..1bf2822 100755
--- a/src/KM_fileio.h
+++ b/src/KM_fileio.h
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2004-2009, John Hurst
+Copyright (c) 2004-2014, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -70,6 +70,45 @@ namespace Kumu
Result_t GetNext(char*);
};
+
+ //
+ enum DirectoryEntryType_t {
+ DET_FILE,
+ DET_DIR,
+ DET_DEV,
+ DET_LINK
+ };
+
+ //
+ class DirScannerEx
+ {
+ std::string m_Dirname;
+#ifdef KM_WIN32
+ __int64 m_Handle;
+ struct _finddatai64_t m_FileInfo;
+#else
+ DIR* m_Handle;
+#endif
+
+ KM_NO_COPY_CONSTRUCT(DirScannerEx);
+
+ public:
+
+ DirScannerEx();
+ ~DirScannerEx() { Close(); }
+
+ Result_t Open(const std::string& dirname);
+ Result_t Close();
+
+
+ inline Result_t GetNext(std::string& next_item_name) {
+ DirectoryEntryType_t ft;
+ return GetNext(next_item_name, ft);
+ }
+
+ Result_t GetNext(std::string& next_item_name, DirectoryEntryType_t& next_item_type);
+ };
+
#ifdef KM_WIN32
typedef __int64 fsize_t;
typedef __int64 fpos_t;