mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
fs: unexport a several windows functions
This commit is contained in:
@@ -75,17 +75,17 @@ func TempFile(dir, prefix string) (f *os.File, err error) {
|
||||
}
|
||||
|
||||
// Chmod changes the mode of the named file to mode.
|
||||
func Chmod(name string, mode os.FileMode) error {
|
||||
func chmod(name string, mode os.FileMode) error {
|
||||
return os.Chmod(fixpath(name), mode)
|
||||
}
|
||||
|
||||
// ClearSystem removes the system attribute from the file.
|
||||
func ClearSystem(path string) error {
|
||||
return ClearAttribute(path, windows.FILE_ATTRIBUTE_SYSTEM)
|
||||
// clearSystem removes the system attribute from the file.
|
||||
func clearSystem(path string) error {
|
||||
return clearAttribute(path, windows.FILE_ATTRIBUTE_SYSTEM)
|
||||
}
|
||||
|
||||
// ClearAttribute removes the specified attribute from the file.
|
||||
func ClearAttribute(path string, attribute uint32) error {
|
||||
// clearAttribute removes the specified attribute from the file.
|
||||
func clearAttribute(path string, attribute uint32) error {
|
||||
ptr, err := windows.UTF16PtrFromString(fixpath(path))
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -105,8 +105,8 @@ func ClearAttribute(path string, attribute uint32) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// OpenHandleForEA return a file handle for file or dir for setting/getting EAs
|
||||
func OpenHandleForEA(nodeType restic.NodeType, path string, writeAccess bool) (handle windows.Handle, err error) {
|
||||
// openHandleForEA return a file handle for file or dir for setting/getting EAs
|
||||
func openHandleForEA(nodeType restic.NodeType, path string, writeAccess bool) (handle windows.Handle, err error) {
|
||||
path = fixpath(path)
|
||||
fileAccess := windows.FILE_READ_EA
|
||||
if writeAccess {
|
||||
|
||||
Reference in New Issue
Block a user