package fs

import "github.com/Microsoft/go-winio/pkg/fs"

This package contains Win32 filesystem functionality.

Index

Variables

var (
	// ErrInvalidPath is returned when the location of a file path doesn't begin with a driver letter.
	ErrInvalidPath = errors.New("the path provided to GetFileSystemType must start with a drive letter")
)

Functions

func GetFileSystemType

func GetFileSystemType(path string) (fsType string, err error)

GetFileSystemType obtains the type of a file system through GetVolumeInformation.

https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationw

func ResolvePath

func ResolvePath(path string) (string, error)

ResolvePath returns the final path to a file or directory represented, resolving symlinks, handling mount points, etc. The resolution works by using the Windows API GetFinalPathNameByHandle, which takes a handle and returns the final path to that file.

It is intended to address short-comings of filepath.EvalSymlinks, which does not work well on Windows.

Source Files

doc.go fs_windows.go resolve.go

Version
v0.6.2 (latest)
Published
Apr 9, 2024
Platform
windows/amd64
Imports
7 packages
Last checked
17 hours ago

Tools for package owners.