GitSharp.Core.DirectoryCache.DirCacheEntry.getPathString C# (CSharp) Метод

getPathString() публичный Метод

Get the entry's complete path. This method is not very efficient and is primarily meant for debugging and final output generation. Applications should try to avoid calling it, and if invoked do so only once per interesting entry, where the name is absolutely required for correct function.
public getPathString ( ) : string
Результат string
        public string getPathString()
        {
            return Constants.CHARSET.GetString(_path);
        }

Usage Example

Пример #1
0
        private void ApplyEdits()
        {
            _edits.Sort(EditComparison);

            int maxIdx  = Cache.getEntryCount();
            int lastIdx = 0;

            foreach (PathEdit e in _edits)
            {
                int  eIdx    = Cache.findEntry(e.Path, e.Path.Length);
                bool missing = eIdx < 0;
                if (eIdx < 0)
                {
                    eIdx = -(eIdx + 1);
                }
                int cnt = Math.Min(eIdx, maxIdx) - lastIdx;
                if (cnt > 0)
                {
                    FastKeep(lastIdx, cnt);
                }
                lastIdx = missing ? eIdx : Cache.nextEntry(eIdx);

                if (e is DeletePath)
                {
                    continue;
                }
                if (e is DeleteTree)
                {
                    lastIdx = Cache.nextEntry(e.Path, e.Path.Length, eIdx);
                    continue;
                }

                DirCacheEntry ent;
                if (missing)
                {
                    ent = new DirCacheEntry(e.Path);
                    e.Apply(ent);
                    if (ent.getRawMode() == 0)
                    {
                        throw new ArgumentException("FileMode not set"
                                                    + " for path " + ent.getPathString());
                    }
                }
                else
                {
                    ent = Cache.getEntry(eIdx);
                    e.Apply(ent);
                }
                FastAdd(ent);
            }

            int count = maxIdx - lastIdx;

            if (count > 0)
            {
                FastKeep(lastIdx, count);
            }
        }
All Usage Examples Of GitSharp.Core.DirectoryCache.DirCacheEntry::getPathString