text: public DirCacheEntry(byte[] newPath, int stage){if (!IsValidPath(newPath)){throw new InvalidPathException(ToString(newPath));}if (stage < 0 || 3 < stage){throw new ArgumentException(MessageFormat.Format(JGitText.Get().invalidStageForPath, stage, ToString(newPath)));}info = new byte[INFO_LEN];infoOffset = 0;path = newPath;int flags = ((stage & unchecked((int)(0x3))) << 12);if (path.Length < NAME_MASK){flags |= path.Length;}else{flags |= NAME_MASK;}NB.EncodeInt16(info, infoOffset + P_FLAGS, flags);}