/usr/include/ossim/base/ossimDirectory.h is in libossim-dev 1.8.16-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | //*******************************************************************
// Copyright (C) 2000 ImageLinks Inc.
//
// License: LGPL
//
// See LICENSE.txt file in the top level directory for more details.
//
// Author: Garrett Potts
//
// Description:
//
//*************************************************************************
// $Id: ossimDirectory.h 14776 2009-06-25 14:34:06Z dburken $
#ifndef ossimDirectory_HEADER
#define ossimDirectory_HEADER
#include <ossim/base/ossimFilename.h>
#ifndef _WIN32
class ossimDirectoryData;
#endif
class OSSIMDLLEXPORT ossimDirectory
{
public:
/*!
* These flags define what kind of filenames is included in the list
* of files enumerated by GetFirst/GetNext.
*/
enum
{
OSSIM_DIR_FILES = 0x0001, // include files
OSSIM_DIR_DIRS = 0x0002, // include directories
OSSIM_DIR_HIDDEN = 0x0004, // include hidden files
OSSIM_DIR_DOTDOT = 0x0008, // include '.' and '..'
// by default, enumerate everything except '.' and '..'
OSSIM_DIR_DEFAULT = OSSIM_DIR_FILES | OSSIM_DIR_DIRS | OSSIM_DIR_HIDDEN
};
ossimDirectory();
ossimDirectory(const ossimFilename& dir);
~ossimDirectory();
bool open(const ossimFilename& dir);
bool isOpened() const;
bool getFirst(ossimFilename &filename,
int flags = OSSIM_DIR_DEFAULT);
/*!
* Get next file in the enumeration started with either GetFirst() or
* GetFirstNormal().
*/
bool getNext(ossimFilename &filename) const;
void findAllFilesThatMatch(std::vector<ossimFilename>& result,
const ossimString& regularExpressionPattern,
int flags = OSSIM_DIR_DEFAULT);
#if defined (_WIN32)
void setFlags(int flags) { theFlags = flags; };
bool fileMatched(ossimFilename &filename) const;
#endif
// ESH 07/2008, Trac #234: OSSIM is case sensitive
// when using worldfile templates during ingest
/*!
* Case insensitive search for files with the same name but
* with letters that have different case than the input name.
*
* On Windows there can only be one match, but the case can be
* different than the input name. On UNIX there can be multiple
* matches.
*
* If the bExcludeExactMatch input parameter is set to false,
* the original input name will be included in the 'result'
* vector if it is found in the directory. Otherwise (the default),
* the input name is excluded from the 'result' vector even if it
* is found in the directory.
*
* Returns true if a name has been added to the result vector.
*/
bool findCaseInsensitiveEquivalents( const ossimFilename &filename,
std::vector<ossimFilename>& result,
bool bExcludeExactMatch = true );
// TODO using scandir() when available later, emulating it otherwise
private:
#if defined (_WIN32)
long theData;
ossimFilename theDirectoryName;
int theFlags;
#else
ossimDirectoryData *theData;
#endif
};
#endif /* #ifndef ossimDirectory_HEADER */
|