GitInternalSlash() статический приватный Метод

Replaces any windows director separators (backslash) with /
static private GitInternalSlash ( byte bytes ) : byte[]
bytes byte
Результат byte[]
Пример #1
0
 private TreeEntry FindMember(string s, byte slast)
 {
     return(FindMember(Repository.GitInternalSlash(Constants.encode(s)), slast, 0));
 }
Пример #2
0
        ///	<summary>
        /// Adds a new or existing file with the specified name to this tree.
        ///	Trees are added if necessary as the name may contain '/':s.
        ///	</summary>
        ///	<param name="name"> Name </param>
        ///	<returns>A <seealso cref="FileTreeEntry"/> for the added file.</returns>
        ///	<exception cref="IOException"></exception>

        public FileTreeEntry AddFile(string name)
        {
            return(AddFile(Repository.GitInternalSlash(Constants.encode(name)), 0));
        }
Пример #3
0
 ///	<summary>
 /// Adds a new or existing Tree with the specified name to this tree.
 ///	Trees are added if necessary as the name may contain '/':s.
 ///	</summary>
 ///	<param name="name"></param>
 ///	<returns>A <seealso cref="FileTreeEntry"/> for the added tree.</returns>
 ///	<exception cref="IOException"> </exception>
 public Tree AddTree(string name)
 {
     return(AddTree(Repository.GitInternalSlash(Constants.encode(name)), 0));
 }
Пример #4
0
 /// <summary>
 /// Look up an entry with the specified path.
 /// </summary>
 /// <param name="path"></param>
 /// <returns>Index entry for the path or null if not in index.</returns>
 public Entry GetEntry(string path)
 {
     byte[] val = Repository.GitInternalSlash(Constants.encode(path));
     return(_entries.Where(e => e.Key.SequenceEqual(val)).FirstOrDefault().Value);
 }