OSDN Git Service

Add Clone Dlg
[tortoisegit/TortoiseGitJp.git] / src / Git / GitAdminDir.h
1 #pragma once\r
2 \r
3 class GitAdminDir\r
4 {\r
5 public:\r
6         GitAdminDir(void);\r
7         ~GitAdminDir(void);\r
8         /**\r
9          * Initializes the global object. Call this after apr is initialized but\r
10          * before using any other methods of this class.\r
11          */\r
12         bool Init();\r
13         /**\r
14          * Clears the memory pool. Call this before you clear *all* pools\r
15          * with apr_pool_terminate(). If you don't use apr_pool_terminate(), then\r
16          * this method doesn't need to be called, because the deconstructor will\r
17          * do the same too.\r
18          */\r
19         bool Close();\r
20         \r
21         /// Returns true if \a name is the admin dir name\r
22         bool IsAdminDirName(const CString& name) const;\r
23         \r
24         /// Returns true if the path points to or below an admin directory\r
25         bool IsAdminDirPath(const CString& path) const;\r
26         \r
27         /// Returns true if the path (file or folder) has an admin directory \r
28         /// associated, i.e. if the path is in a working copy.\r
29         bool HasAdminDir(const CString& path) const;\r
30         bool HasAdminDir(const CString& path, bool bDir) const;\r
31         \r
32         /// Returns true if the admin dir name is set to "_svn".\r
33         bool IsVSNETHackActive() const {return m_bVSNETHack;}\r
34         \r
35         CString GetAdminDirName() const {return _T(".git");}\r
36         CString GetVSNETAdminDirName() const {return _T("_git");}\r
37 private:\r
38         bool m_bVSNETHack;\r
39         int m_nInit;\r
40 \r
41 };\r
42 \r
43 extern GitAdminDir g_GitAdminDir;