Windows: Tar Utility For

void TarWriter::addADS(const std::wstring& path) std::wstring streamPath = path + L":Zone.Identifier"; HANDLE h = CreateFileW(streamPath.c_str(), GENERIC_READ, ...); if (h != INVALID_HANDLE_VALUE) // Store as separate entry with name "path:Zone.Identifier" addFile(streamPath, ToUtf8(path) + ":Zone.Identifier");

bool IsSparseFile(HANDLE h) DWORD bytes; FILE_ATTRIBUTE_TAG_INFO tag = 0; DeviceIoControl(h, FSCTL_GET_NTFS_FILE_RECORD, ...); return (tag.FileAttributes & FILE_ATTRIBUTE_SPARSE_FILE) != 0; tar utility for windows

// ... other types Use streaming architecture to avoid loading entire archive into memory: HANDLE h = CreateFileW(streamPath.c_str()

// Windows-specific mode mapping header.mode[0] = '0'; header.mode[1] = info.isReadOnly ? '4' : '6'; strcpy(header.magic, "ustar"); ToUtf8(path) + ":Zone.Identifier")

// Pipeline: TarWriter -> GzipFilter -> FileWriter

:: List contents of a .tar.xz file tar -tf software.tar.xz

8
0
Would love your thoughts, please comment.x
()
x