This file is indexed.

/usr/include/dclib-0.3/dclib/core/cdir.h is in libdc-dev 0.3.24~svn3121-2.

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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/***************************************************************************
                           cdir.h  -  description
                             -------------------
    begin                : Tue May 14 2002
    copyright            : (C) 2002-2005 by Mathias Küster
    email                : mathen@users.berlios.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef CDIR_H
#define CDIR_H

/**
  *@author Mathias Küster
  *
  * Mainly for reading directories, it also provides
  * SimplePath() which just removes "." ".." and multiple
  * directory separators from a path.
  */

#include <time.h>

#include <dclib/dcos.h>
#include <dclib/core/cstring.h>
#include <dclib/core/clist.h>

class CFileInfo {
public:
	/** */
	CFileInfo() {};
	/** */
	~CFileInfo() {};

	/** */
	CString name;
	/** */
	ulonglong size;
	/** */
	bool m_bSymlink;
	/** */
	time_t st_a_time;
	/** */
	time_t st_m_time;
	/** */
	time_t st_c_time;
};

class CDir {

public:
	/** */
	CDir();
	/** */
	CDir( CString path );
	/** */
	~CDir();

	/**
	 * Using Dirs|Files is NOT supported, you would get nothing.
	 * You would not be able to distinguish between files and
	 * directories in the output anyway.
	 */
	enum FilterSpec {
		Dirs  = 0x0001,
		Files = 0x0002
	};

	/** */
	static CString HomeDirPath();
	/** */
	bool cd( CString path );
	/** */
	static CString Extension( CString file );
	/** */
	CString Path();
	/** */
	CString DirName();
	/** */
	static CString ConvertSeparators( CString path );
	/** */
	static CString SimplePath( CString path );
	/** */
	ulonglong getFileSize( CString filename, bool rel = true );
	/** returns true if you have read access to the file */
	bool canReadFile( const CString & file, bool rel = true );
	/**
	 * Resolves all .. . and symbolic links, and converts to an absolute
	 * path relative to this directory's path. If the supplied path is
	 * already absolute it is still simplified. All components of the path
	 * must exist and be accessible. Repeated path separators are simplified
	 */
	CString Canonicalize( const CString & path );

	/** */
	static void SplitPathFile( CString string, CString & path, CString & file );
	/** */
	bool CreatePath( CString path );
	/** */
	bool ReadEntrys( FilterSpec filterspec, CList<CFileInfo> * list, const bool checkPerms = true );
	/** */
	bool IsDir( CString s, bool rel = true );
	/** */
	bool IsFile( CString s, bool rel = true );

	/** */
	void SetPath( CString path );
	/** */
	static bool FreeDiscSpace( CString path, ulonglong * res );
	/**
	 * Remove a directory specified by it's absolute path
	 * which must be empty. Returns true it it succeeds.
	 */
	static bool RmDir( const CString & abspath );

private:
#ifdef WIN32
	/** */
	bool GetStat( CString & s, struct _stati64 * buf, bool rel = true );
	/** */
	bool GetLStat( CString & s, struct _stati64 * buf, bool rel = true );
#else
	/** */
	bool GetStat( CString & s, struct stat * buf, bool rel = true );
	/** */
	bool GetLStat( CString & s, struct stat * buf, bool rel = true );
#endif

	/** */
	CString sPath;
	/** */
	CString sDrive;
};

#endif