PageRenderTime 20ms CodeModel.GetById 12ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llvfs/lldir_linux.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 64 lines | 27 code | 12 blank | 25 comment | 1 complexity | 2e78a9b7f52b5f16d864b6d701e33358 MD5 | raw file
 1/** 
 2 * @file lldir_linux.h
 3 * @brief Definition of directory utilities class for linux
 4 *
 5 * $LicenseInfo:firstyear=2000&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#if !LL_LINUX
28#error This header must not be included when compiling for any target other than Linux. Consider including lldir.h instead.
29#endif // !LL_LINUX
30
31#ifndef LL_LLDIR_LINUX_H
32#define LL_LLDIR_LINUX_H
33
34#include "lldir.h"
35
36#include <dirent.h>
37#include <errno.h>
38
39class LLDir_Linux : public LLDir
40{
41public:
42	LLDir_Linux();
43	virtual ~LLDir_Linux();
44
45	/*virtual*/ void initAppDirs(const std::string &app_name,
46		const std::string& app_read_only_data_dir);
47
48	virtual std::string getCurPath();
49	virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
50	/*virtual*/ BOOL fileExists(const std::string &filename) const;
51
52	/*virtual*/ std::string getLLPluginLauncher();
53	/*virtual*/ std::string getLLPluginFilename(std::string base_name);
54
55private:
56	DIR *mDirp;
57	int mCurrentDirIndex;
58	int mCurrentDirCount;
59	std::string mCurrentDir;
60};
61
62#endif // LL_LLDIR_LINUX_H
63
64