mirror of
https://github.com/rwinkhart/cmutton.git
synced 2026-08-28 04:46:46 -04:00
Finish port of functions from "global" package
This commit is contained in:
@@ -37,10 +37,10 @@ Build the C library + headers w/`go build -buildmode=c-archive`.
|
||||
- [X] DirInit(preserveOldCfgDir bool) (string, error)
|
||||
- [ ] ~~GenDeviceIDList() ([]fs.DirEntry, error)~~
|
||||
- [X] GetCurrentDeviceID() (string, error)
|
||||
- [ ] GetRealAgePath(vanityPath string) string
|
||||
- [ ] GetRealPath(vanityPath string) string
|
||||
- [ ] GetSysProcAttr() *syscall.SysProcAttr
|
||||
- [ ] GetVanityPath(realPath string) string
|
||||
- [X] GetRealAgePath(vanityPath string) string
|
||||
- [X] GetRealPath(vanityPath string) string
|
||||
- [ ] ~~GetSysProcAttr() *syscall.SysProcAttr~~
|
||||
- [X] GetVanityPath(realPath string) string
|
||||
- [ ] syncclient
|
||||
- [ ] AddFolderRemote(vanityPath string) error
|
||||
- [ ] GenDeviceID(oldDeviceID, prefix string) (string, string, bool, error)
|
||||
|
||||
@@ -36,4 +36,28 @@ func GetCurrentDeviceID() (*C.char, *C.char) {
|
||||
return C.CString(currentDeviceID), nil
|
||||
}
|
||||
|
||||
// GetRealAgePath returns:
|
||||
// realAgePath
|
||||
//
|
||||
//export GetRealAgePath
|
||||
func GetRealAgePath(vanityPath *C.char) *C.char {
|
||||
return C.CString(global.GetRealAgePath(C.GoString(vanityPath)))
|
||||
}
|
||||
|
||||
// GetRealPath returns:
|
||||
// realPath
|
||||
//
|
||||
//export GetRealPath
|
||||
func GetRealPath(vanityPath *C.char) *C.char {
|
||||
return C.CString(global.GetRealPath(C.GoString(vanityPath)))
|
||||
}
|
||||
|
||||
// GetVanityPath returns:
|
||||
// vanityPath
|
||||
//
|
||||
//export GetVanityPath
|
||||
func GetVanityPath(realPath *C.char) *C.char {
|
||||
return C.CString(global.GetVanityPath(C.GoString(realPath)))
|
||||
}
|
||||
|
||||
func main() {}
|
||||
|
||||
Reference in New Issue
Block a user