dos

package
v0.0.0-...-ae9e989 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COINIT_APARTMENTTHREADED uintptr = 0x2
	COINIT_MULTITHREADED     uintptr = 0x0
	COINIT_DISABLE_OLE1DDE   uintptr = 0x4
	COINIT_SPEED_OVER_MEMORY uintptr = 0x8
)
View Source
const (
	SW_HIDE            = 0
	SW_MAXIMIZE        = 3
	SW_MINIMIZE        = 6
	SW_RESTORE         = 9
	SW_SHOW            = 5
	SW_SHOWDEFAULT     = 1
	SW_SHOWMAXIMIZED   = 3
	SW_SHOWMINIMIZED   = 2
	SW_SHOWMINNOACTIVE = 7
	SW_SHOWNA          = 8
	SW_SHOWNOACTIVATE  = 4
	SW_SHOWNORMAL      = 1
)
View Source
const (
	EDIT       = "edit"
	EXPLORE    = "explore"
	OPEN       = "open"
	PRINT      = "print"
	PROPERTIES = "properties"
	RUNAS      = "runas"
)
View Source
const CP_THREAD_ACP = 3
View Source
const FILE_ATTRIBUTE_HIDDEN = 0x00000002
View Source
const FILE_ATTRIBUTE_NORMAL = 0x00000080
View Source
const FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400
View Source
const MOVEFILE_COPY_ALLOWED = 0x00000002
View Source
const MOVEFILE_REPLACE_EXISTING = 0x00000001
View Source
const MOVEFILE_WRITE_THROUGH = 0x00000008

Variables

This section is empty.

Functions

func AtoU

func AtoU(mbcs []byte) (string, error)

Get utf8(go-native) string from ansi string (current codepage multibyte string)

func Chdir

func Chdir(folder_ string) error

Change the current working directory without changeing the working directory in the last drive.

func Chdrive

func Chdrive(drive string) error

Change drive without changing the working directory there.

func CoInitializeEx

func CoInitializeEx(res, opt uintptr)

func CoUninitialize

func CoUninitialize()

func Copy

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

func CorrectPathCase

func CorrectPathCase(path string) (string, error)

func DirName

func DirName(path string) string

func ForFiles

func ForFiles(pattern string, callback func(*FileInfo) bool) error

func GetFileAttributes

func GetFileAttributes(path string) (uint32, error)

func GetFileAttributesFromFileInfo

func GetFileAttributesFromFileInfo(status os.FileInfo) uint32

func GetHome

func GetHome() string

Get %HOME% || %USERPROFILE% || ""

func GetModuleFileName

func GetModuleFileName() (string, error)

func Getwd

func Getwd() (string, error)

func Glob

func Glob(pattern string) ([]string, error)

Expand filenames matching with wildcard-pattern.

func IsExecutableSuffix

func IsExecutableSuffix(path string) bool

func Join

func Join(paths ...string) string

Equals filepath.Join but this works right when path has drive-letter.

func Move

func Move(src, dst string) error

func ReadAnsiLine

func ReadAnsiLine(f *os.File) (string, error)

func ReplaceHomeToTilde

func ReplaceHomeToTilde(wd string) string

func ReplaceHomeToTildeSlash

func ReplaceHomeToTildeSlash(wd string) string

func SetFileAttributes

func SetFileAttributes(path string, attr uint32) error

func ShellExecute

func ShellExecute(action string, path string, param string, directory string) error

Call ShellExecute-API: edit,explore,open and so on.

func Truncate

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

func UtoA

func UtoA(utf8 string) ([]byte, error)

Get ansi string (current codepage multibyte string) from utf8(go-native) string

func YenYen2Yen

func YenYen2Yen(path string) string

Types

type FileInfo

type FileInfo struct {
	// contains filtered or unexported fields
}

func (*FileInfo) Attribute

func (this *FileInfo) Attribute() uint32

func (*FileInfo) IsDir

func (this *FileInfo) IsDir() bool

func (*FileInfo) IsExecutable

func (this *FileInfo) IsExecutable() bool

func (*FileInfo) IsHidden

func (this *FileInfo) IsHidden() bool

func (*FileInfo) IsReadOnly

func (this *FileInfo) IsReadOnly() bool

func (*FileInfo) IsReparsePoint

func (this *FileInfo) IsReparsePoint() bool

func (*FileInfo) IsSystem

func (this *FileInfo) IsSystem() bool

func (*FileInfo) ModTime

func (this *FileInfo) ModTime() time.Time

func (*FileInfo) Mode

func (this *FileInfo) Mode() os.FileMode

func (*FileInfo) Name

func (this *FileInfo) Name() string

func (*FileInfo) Size

func (this *FileInfo) Size() int64

func (*FileInfo) Sys

func (this *FileInfo) Sys() interface{}

Jump to

Keyboard shortcuts

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