mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 19:27:36 +00:00
Everywhere: "file name" => "filename"
This commit is contained in:
parent
def1f1444a
commit
7ae7170d61
59 changed files with 181 additions and 181 deletions
|
@ -38,7 +38,7 @@ constexpr const char* posix1_tar_version = ""; // POSIX.1-1988 format version
|
|||
|
||||
class [[gnu::packed]] TarFileHeader {
|
||||
public:
|
||||
const StringView file_name() const { return m_file_name; }
|
||||
const StringView filename() const { return m_filename; }
|
||||
mode_t mode() const { return get_tar_field(m_mode); }
|
||||
uid_t uid() const { return get_tar_field(m_uid); }
|
||||
gid_t gid() const { return get_tar_field(m_gid); }
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
// FIXME: support ustar filename prefix
|
||||
const StringView prefix() const { return m_prefix; }
|
||||
|
||||
void set_file_name(const String& file_name) { VERIFY(file_name.copy_characters_to_buffer(m_file_name, sizeof(m_file_name))); }
|
||||
void set_filename(const String& filename) { VERIFY(filename.copy_characters_to_buffer(m_filename, sizeof(m_filename))); }
|
||||
void set_mode(mode_t mode) { VERIFY(String::formatted("{:o}", mode).copy_characters_to_buffer(m_mode, sizeof(m_mode))); }
|
||||
void set_uid(uid_t uid) { VERIFY(String::formatted("{:o}", uid).copy_characters_to_buffer(m_uid, sizeof(m_uid))); }
|
||||
void set_gid(gid_t gid) { VERIFY(String::formatted("{:o}", gid).copy_characters_to_buffer(m_gid, sizeof(m_gid))); }
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
void calculate_checksum();
|
||||
|
||||
private:
|
||||
char m_file_name[100];
|
||||
char m_filename[100];
|
||||
char m_mode[8];
|
||||
char m_uid[8];
|
||||
char m_gid[8];
|
||||
|
|
|
@ -132,7 +132,7 @@ void TarOutputStream::add_directory(const String& path, mode_t mode)
|
|||
TarFileHeader header;
|
||||
memset(&header, 0, sizeof(header));
|
||||
header.set_size(0);
|
||||
header.set_file_name(String::formatted("{}/", path)); // Old tar implementations assume directory names end with a /
|
||||
header.set_filename(String::formatted("{}/", path)); // Old tar implementations assume directory names end with a /
|
||||
header.set_type_flag(TarFileType::Directory);
|
||||
header.set_mode(mode);
|
||||
header.set_magic(gnu_magic);
|
||||
|
@ -149,7 +149,7 @@ void TarOutputStream::add_file(const String& path, mode_t mode, const ReadonlyBy
|
|||
TarFileHeader header;
|
||||
memset(&header, 0, sizeof(header));
|
||||
header.set_size(bytes.size());
|
||||
header.set_file_name(path);
|
||||
header.set_filename(path);
|
||||
header.set_type_flag(TarFileType::NormalFile);
|
||||
header.set_mode(mode);
|
||||
header.set_magic(gnu_magic);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue