util

package
v0.0.0-...-baf1b81 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AndroidBuildToolsPath

func AndroidBuildToolsPath() string

AndroidBuildToolsPath tries to find the location of the "build-tools" directory. This depends on ANDROID_HOME variable, so you should call RequireAndroidSDK() first.

func CopyExeFile

func CopyExeFile(src, tgt string) error

CopyExeFile copies the content of an executable file, source, into target path.

func CopyFile

func CopyFile(source, target string) error

CopyFile copies the content of a regular file, source, into target path.

func EnsureAbsPath

func EnsureAbsPath(path string) string

EnsureAbsPath returns the absolute path of the given file if it is not already absolute

func EnsureSubDir

func EnsureSubDir(parent, name string) string

EnsureSubDir will make sure a named directory exists within the parent - creating it if not.

func Exists

func Exists(path string) bool

Exists will return true if the passed path exists on the current system.

func IsAndroid

func IsAndroid(os string) bool

IsAndroid returns true if the given os parameter represents one of the Android targets.

func IsIOS

func IsIOS(os string) bool

IsIOS returns true if the given os parameter represents one of the iOS targets (ios, iossimulator)

func IsMobile

func IsMobile(os string) bool

IsMobile returns true if the given os parameter represents a platform handled by gomobile.

func MakePathRelativeTo

func MakePathRelativeTo(root, path string) string

MakePathRelativeTo joins root with path if path is not absolute and exists in root

func RequireAndroidSDK

func RequireAndroidSDK() error

RequireAndroidSDK will return an error if it cannot establish the location of a valid Android SDK installation. This is currently deduced using ANDROID_HOME environment variable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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