Logo
Explore Help
Sign In
TheArchive/restic
1
0
Fork 0
You've already forked restic
mirror of https://github.com/restic/restic.git synced 2025-05-09 02:37:10 +00:00
Code Issues Packages Projects Releases Wiki Activity
restic/internal/fs/node_unix.go

13 lines
153 B
Go
Raw Normal View History

add go:build headers everywhere
2022-03-28 22:23:47 +02:00
//go:build !windows
Portability fixes to internal/restic syscall.Mknod is not available on AIX.
2020-05-24 19:30:20 +02:00
// +build !windows
Add Windows node support. The syscall.Stat_t doesn't exist on Windows, so it is replaced by an interface, which Windows can fill out, and field access is replaced by function calls. Common Unix functionality is put into "node_unix.go", so there is less boilerplate. Symlinks are skipped on Windows, since they require admin privileges.
2015-08-14 15:57:47 +02:00
restic: extract Node filesystem code to fs package
2024-08-26 23:03:25 +02:00
package fs
Add Windows node support. The syscall.Stat_t doesn't exist on Windows, so it is replaced by an interface, which Windows can fill out, and field access is replaced by function calls. Common Unix functionality is put into "node_unix.go", so there is less boilerplate. Symlinks are skipped on Windows, since they require admin privileges.
2015-08-14 15:57:47 +02:00
import (
"os"
)
Make restic.{lchown,mknod} regular functions This way, they can be inlined and dead code can be removed on Windows. Also fixed some comments.
2021-05-27 21:29:51 +02:00
func lchown(name string, uid, gid int) error {
return os.Lchown(name, uid, gid)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.6 Page: 278ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API