nodos

package
v0.0.0-...-75e9361 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REPARSE_POINT = reparsePoint
)
View Source
const S_OK = 0

Code generated by go-importconst DO NOT EDIT.

Variables

This section is empty.

Functions

func ChangeConsoleMode

func ChangeConsoleMode(console Handle, ops ...ModeOp) (func(), error)

func Chdir

func Chdir(folder string) (err error)

func Chdrive

func Chdrive(drive string) (string, error)

Chdrive changes drive without changing the working directory there. And returns the previous working directory.

func Copy

func Copy(src, dst string, isFailIfExists bool) error

func EnableProcessInput

func EnableProcessInput() (func(), error)

EnableProcessInput enables Ctrl-C's signal and console's echo back.

func GetFileAttributes

func GetFileAttributes(path string) (uint32, error)

func GetHome

func GetHome() string

GetHome get %HOME% or %USERPROFILE%

func IsExecutableSuffix

func IsExecutableSuffix(path string) bool

IsExecutableSuffix returns true if suffix exists in %PATHEXT% and %NYAGOSPATHEXT%

func IsGui

func IsGui(fname string) bool

IsGui returns true if fname is Windows GUI Application

func Join

func Join(paths ...string) string

Join is compatible with CPath::Combine of MFC (ex:`C:\foo` + `\bar` -> `c:\bar`) Do not clean path (keep `./` on arguments)

func JoinList

func JoinList(values ...string) string

func LookPath

func LookPath(where LookCurdirT, name string, envnames ...string) string

LookPath search `name` from %PATH% and the directories listed by the environment variables `envnames`.

func Move

func Move(src, dst string) error

func ReplaceHomeToTilde

func ReplaceHomeToTilde(wd string) string

ReplaceHomeToTilde replaces path like C:\users\name\foo\bar -> ~\foo\bar

func ReplaceHomeToTildeSlash

func ReplaceHomeToTildeSlash(wd string) string

ReplaceHomeToTildeSlash replaces path like C:\users\name\foo\bar -> ~/foo/bar

func SetFileAttributes

func SetFileAttributes(path string, attr uint32) error

func ShOpenWithDialog

func ShOpenWithDialog(filename, class string) (err error)

func TimeFormatOsLayout

func TimeFormatOsLayout(t time.Time) (string, error)

func Truncate

func Truncate(folder string, whenError func(string, error) bool, out io.Writer) error

Types

type Handle

type Handle = uintptr

type LookCurdirT

type LookCurdirT int

LookCurdirT is the type for constant meaning the current directory should be looked.

const (
	// LookCurdirFirst means that the current directory should be looked at first.
	LookCurdirFirst LookCurdirT = iota
	// LookCurdirLast  means that the current directory should be looked at last.
	LookCurdirLast
	// LookCurdirNever menas that the current directory should be never looked.
	LookCurdirNever
)

type ModeOp

type ModeOp interface {
	Op(mode uint32) uint32
}

type ModeReset

type ModeReset uint32

func (ModeReset) Op

func (ms ModeReset) Op(mode uint32) uint32

type ModeSet

type ModeSet uint32

func (ModeSet) Op

func (ms ModeSet) Op(mode uint32) uint32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL