/// <summary> /// /// </summary> /// <param name="fileName"> /// File name without path /// </param> /// <returns> /// </returns> internal static RepositoryFileName GetFileDescriptorImpl(string fileName) { RepositoryFileName retval = null; Match match = _nameExpression.Match(fileName); if (match.Success) { retval = new RepositoryFileName(); retval.FirstItemTimestamp = new DateTime( long.Parse( match.Groups[_nameExpressionGroupIndexFirstTimestamp].Value, System.Globalization.NumberStyles.HexNumber)); retval.LastItemTimestamp = new DateTime( long.Parse( match.Groups[_nameExpressionGroupIndexLastTimestamp].Value, System.Globalization.NumberStyles.HexNumber)); retval.EncryptorCode = match.Groups[_nameExpressionGroupIndexEncryption].Value; retval.CompressorCode = match.Groups[_nameExpressionGroupIndexExtension].Value; } return(retval); }
/// <summary> /// Get object representing file name. /// </summary> /// <param name="fileName"> /// File name (not file path). /// </param> /// <returns> /// <see cref="IRepositoryFileName"/> instance representing the file. /// </returns> public virtual IRepositoryFileName GetFileDescriptor(string fileName) { CheckHelper.CheckRepositoryNotDisposed(Repository); Check.DoRequireArgumentNotNull(fileName, "fileName"); return(RepositoryFileName.GetFileDescriptorImpl(fileName)); }