コード例 #1
0
ファイル: TarEntry.cs プロジェクト: miguelC/Sirona.Utilities
        /// <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);
        }
コード例 #2
0
ファイル: TarEntry.cs プロジェクト: miguelC/Sirona.Utilities
        /// <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);
        }