Skip to content
Browse files

Add new Mode enum

  • Loading branch information...
1 parent 43ea52a commit 0787252beb87eb9e7a707e6c414c533b9f8bc38f @nulltoken committed Apr 16, 2012
Showing with 41 additions and 0 deletions.
  1. +1 −0 LibGit2Sharp/LibGit2Sharp.csproj
  2. +40 −0 LibGit2Sharp/Mode.cs
View
1 LibGit2Sharp/LibGit2Sharp.csproj
@@ -107,6 +107,7 @@
<Compile Include="Filter.cs" />
<Compile Include="IQueryableCommitCollection.cs" />
<Compile Include="Core\LookUpOptions.cs" />
+ <Compile Include="Mode.cs" />
<Compile Include="ObjectDatabase.cs" />
<Compile Include="ReferenceWrapper.cs" />
<Compile Include="ObjectId.cs" />
View
40 LibGit2Sharp/Mode.cs
@@ -0,0 +1,40 @@
+namespace LibGit2Sharp
+{
+ /// <summary>
+ /// Git specific modes for entries.
+ /// </summary>
+ public enum Mode
+ {
+ // Inspired from http://stackoverflow.com/a/8347325/335418
+
+ /// <summary>
+ /// 040000 file mode
+ /// </summary>
+ Directory = 0x4000,
+
+ /// <summary>
+ /// 100644 file mode
+ /// </summary>
+ NonExecutableFile = 0x81A4,
+
+ /// <summary>
+ /// 100664 file mode
+ /// </summary>
+ NonExecutableGroupWriteableFile = 0x81B4,
+
+ /// <summary>
+ /// 100755 file mode
+ /// </summary>
+ ExecutableFile = 0x81ED,
+
+ /// <summary>
+ /// 120000 file mode
+ /// </summary>
+ SymbolicLink = 0xA000,
+
+ /// <summary>
+ /// 160000 file mode
+ /// </summary>
+ GitLink = 0xE000
+ }
+}

0 comments on commit 0787252

Please sign in to comment.
Something went wrong with that request. Please try again.