/// <summary> /// Returns the FileInfo dictionary /// </summary> /// <param name="path">The file or directory for which to retrieve information.</param> unsafe public Dictionary <string, string> GetFileInfo(string path) { Dictionary <string, string> ans = new Dictionary <string, string>(); void *data = null; int ret = MobileDevice.AFCFileInfoOpen(hAFC, path, ref data); if (ret == 0 && data != null) { void *pname, pvalue; while (MobileDevice.AFCKeyValueRead(data, out pname, out pvalue) == 0 && pname != null && pvalue != null) { string name = Marshal.PtrToStringAnsi(new IntPtr(pname)); string value = Marshal.PtrToStringAnsi(new IntPtr(pvalue)); ans.Add(name, value); } MobileDevice.AFCKeyValueClose(data); } return(ans); }