Exemplo n.º 1
0
        /// <summary>
        /// Construct an entry for a file. File is set to file, and the
        /// header is constructed from information from the file.
        /// </summary>
        /// <param name = "fileName">
        /// The file that the entry represents.
        /// </param>
        public static TarEntry CreateEntryFromFile(string fileName)
        {
            TarEntry entry = new TarEntry();

            entry.Initialize();
            entry.GetFileTarHeader(entry.header, fileName);
            return(entry);
        }
Exemplo n.º 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)
        {
            TarEntry entry = new TarEntry();

            entry.Initialize();
            entry.NameTarHeader(entry.header, name);
            return(entry);
        }
Exemplo n.º 3
0
		/// <summary>
		/// Construct an entry for a file. File is set to file, and the
		/// header is constructed from information from the file.
		/// </summary>
		/// <param name = "fileName">
		/// The file that the entry represents.
		/// </param>
		public static TarEntry CreateEntryFromFile(string fileName)
		{
			TarEntry entry = new TarEntry();
			entry.Initialize();
			entry.GetFileTarHeader(entry.header, fileName);
			return entry;
		}
Exemplo n.º 4
0
		/// <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;
		}