NameTarHeader() public static method

Fill in a TarHeader given only the entry's name.
public static NameTarHeader ( TarHeader header, string name ) : void
header TarHeader /// The TarHeader to fill in. ///
name string /// The tar entry name. ///
return void
        /// <summary>
        /// Construct an entry with only a <paramref name="name">name</paramref>.
        /// This allows the programmer to construct the entry's header "by hand".
        /// </summary>
        /// <param name="name">The name to use for the entry</param>
        /// <returns>Returns the newly created <see cref="TarEntry"/></returns>
        public static TarEntry CreateTarEntry(string name)
        {
            TarEntry entry = new TarEntry();

            TarEntry.NameTarHeader(entry.header, name);
            return(entry);
        }
Beispiel #2
0
        /// <summary>
        /// Construct an entry with only a <paramref name="name"></paramref>.
        /// This allows the programmer to construct the entry's header "by hand".
        /// </summary>
        public static TarEntry CreateTarEntry(string name)
        {
            var entry = new TarEntry();

            entry.Initialize();
            entry.NameTarHeader(entry.header, name);
            return(entry);
        }
		/// <summary>
		/// Construct an entry with only a name. This allows the programmer
		/// to construct the entry's header "by hand". File is set to null.
		/// </summary>
		public static TarEntry CreateTarEntry(string name)
		{
			TarEntry entry = new TarEntry();
			entry.Initialize();
			entry.NameTarHeader(entry.header, name);
			return entry;
		}