Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasPathPrefix ¶
HasPathPrefix returns true if p is a subdir of (or a file within) base. It assumes a file system which is case sensitive. If the paths are not of the same type (one is relative, the other is absolute), false is returned.
func HasSufficientPrivilegesForVSS ¶
func HasSufficientPrivilegesForVSS() error
HasSufficientPrivilegesForVSS returns true if the user is allowed to use VSS.
Types ¶
type ErrorHandler ¶
ErrorHandler is used to report errors via callback
type LocalVss ¶
type LocalVss struct {
// contains filtered or unexported fields
}
LocalVss is a wrapper around the local file system which uses windows volume shadow copy service (VSS) in a transparent way.
func NewLocalVss ¶
func NewLocalVss(msgError ErrorHandler, msgMessage MessageHandler) *LocalVss
NewLocalVss creates a new wrapper around the windows filesystem using volume shadow copy service to access locked files.
func (*LocalVss) DeleteSnapshots ¶
func (vss *LocalVss) DeleteSnapshots()
DeleteSnapshots deletes all snapshots that were created automatically.
func (*LocalVss) SnapshotPath ¶
SnapshotPath returns the path inside a VSS snapshots if it already exists. If the path is not yet available as a snapshot, a snapshot is created. If creation of a snapshot fails the file's original path is returned as a fallback.
type MessageHandler ¶
type MessageHandler func(msg string, args ...interface{})
MessageHandler is used to report errors/messages via callbacks.
type MountPoint ¶
type MountPoint struct { }
MountPoint is a dummy for non-windows platforms to let client code compile.
func (*MountPoint) GetSnapshotDeviceObject ¶
func (p *MountPoint) GetSnapshotDeviceObject() string
GetSnapshotDeviceObject returns root path to access the snapshot files and folders.
func (*MountPoint) IsSnapshotted ¶
func (p *MountPoint) IsSnapshotted() bool
IsSnapshotted is true if this mount point was snapshotted successfully.
type VssSnapshot ¶
type VssSnapshot struct {
// contains filtered or unexported fields
}
VssSnapshot is a dummy for non-windows platforms to let client code compile.
func NewVssSnapshot ¶
func NewVssSnapshot( volume string, timeoutInSeconds uint, msgError ErrorHandler) (VssSnapshot, error)
NewVssSnapshot creates a new vss snapshot. If creating the snapshots doesn't finish within the timeout an error is returned.
func (*VssSnapshot) Delete ¶
func (p *VssSnapshot) Delete() error
Delete deletes the created snapshot.
func (*VssSnapshot) GetSnapshotDeviceObject ¶
func (p *VssSnapshot) GetSnapshotDeviceObject() string
GetSnapshotDeviceObject returns root path to access the snapshot files and folders.