Documentation ¶
Index ¶
- Variables
- func DecodePlist(fp, targetPath string) ([]map[string]interface{}, error)
- func DecodePlistBytes(plistBytes []byte) (interface{}, error)
- func FileMetadata(fp string, modulename string) (map[string]string, error)
- func FileTimestamps(fp string, modulename string) map[string]string
- func GetCodesignatures(fp string) []string
- func GetSingleValueFromPlist(data []map[string]interface{}, key string) (string, error)
- func GetSingleValueInterfaceFromPlist(data []map[string]interface{}, key string) (interface{}, error)
- func IsSameFile(a, b string) bool
- func ListXAttr(filename string) ([]string, error)
- func PrintPlistAsJSON(obj interface{})
- func ReadAttrFile(filename string) []byte
- func ReadXAttr(filename, xattrName string) ([]byte, error)
- func ToPlist(data interface{}) string
- func UnarchiveNSKeyedArchiver(fp string) ([]interface{}, error)
- func UnarchiveNSKeyedArchiverBytes(f []byte) ([]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
var KEY string
var KEY2 string
var RET interface{}
RET Global return NOTE: THIS IS VERY MESSY
var RET2 interface{}
Functions ¶
func DecodePlist ¶
DecodePlist returns an array of maps corresponding to entries within the given plist, values are interface
func DecodePlistBytes ¶
DecodePlistBytes decodes a binary or XML based Plist from bytes into an interface. Returns error from library
func GetCodesignatures ¶
func GetSingleValueFromPlist ¶
GetSingleValueFromPlist returns the first encountered value from a given plist as a string
func GetSingleValueInterfaceFromPlist ¶
func GetSingleValueInterfaceFromPlist(data []map[string]interface{}, key string) (interface{}, error)
GetSingleValueInterfaceFromPlist returns the first encountered value from a given plist as an interface
func IsSameFile ¶
IsSameFile returns true if two filenames describe the same underlying file (i.e. inode)
func PrintPlistAsJSON ¶
func PrintPlistAsJSON(obj interface{})
func ReadAttrFile ¶
ReadAttrFile reads a hash for the given file. It's the fallback for ReadAttr and pairs with RecordAttrFile to read the same files it would write.
func ReadXAttr ¶
ReadAttr reads an attribute from the given file, using xattrs It returns an empty slice if it can't be read.
func ToPlist ¶
func ToPlist(data interface{}) string
ToPlist converts a given struct to a Plist using the github.com/DHowett/go-plist library. Make sure your struct is exported. It returns a string containing the plist.
func UnarchiveNSKeyedArchiver ¶
UnarchiveNSKeyedArchiver extracts an NSKeyedArchiver Plist from a given filepath, (XML or Binary), and returns an array of the NSObjects converted to usable Go Types Primitives will be extracted just like regular Plist primitives (string, float64, int64, []uint8 etc.). NSArray, NSMutableArray, NSSet and NSMutableSet will transformed into []interface{} NSDictionary and NSMutableDictionary will be transformed into map[string] interface{}
Types ¶
This section is empty.