Support backup and restore of special files on POSIX style systems

Special files are device nodes and named pipes. The necessity of the
former is clear, the latter is debatable.
In order to preserve backward compatibility, the device number is
encoded in the StartChunk/StartOffset fields of the entry.
This commit is contained in:
2023-10-03 15:08:34 -05:00
parent fee1cb859e
commit 88c92da9bd
6 changed files with 72 additions and 8 deletions

View File

@@ -117,6 +117,14 @@ func (entry *Entry) SetAttributesToFile(fullPath string) {
}
func (entry *Entry) ReadDeviceNode(fileInfo os.FileInfo) bool {
return nil
}
func (entry *Entry) RestoreSpecial(fullPath string) error {
return nil
}
func joinPath(components ...string) string {
combinedPath := `\\?\` + filepath.Join(components...)