示例#1
0
        /// <summary>
        /// Gets the name of the meta file by.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns>System.Nullable{WIN32_FIND_DATA}.</returns>
        /// <exception cref="System.ArgumentNullException"></exception>
        public WIN32_FIND_DATA?GetMetaFileByName(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException();
            }

            if (MetadataFileDictionary != null)
            {
                WIN32_FIND_DATA entry;

                if (MetadataFileDictionary.TryGetValue(name, out entry))
                {
                    return(entry);
                }
            }

            return(GetFileSystemEntryByName(name));
        }
示例#2
0
        /// <summary>
        /// Gets the meta file by path.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <returns>System.Nullable{WIN32_FIND_DATA}.</returns>
        /// <exception cref="System.ArgumentNullException"></exception>
        public WIN32_FIND_DATA?GetMetaFileByPath(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException();
            }

            if (MetadataFileDictionary != null)
            {
                WIN32_FIND_DATA entry;

                if (MetadataFileDictionary.TryGetValue(System.IO.Path.GetFileName(path), out entry))
                {
                    return(entry);
                }
            }

            return(GetFileSystemEntryByPath(path));
        }