// Token: 0x06000082 RID: 130 RVA: 0x000056A8 File Offset: 0x000038A8 public static XEFileInfo Open(iPhoneXE phone, string path, FileAccess openmode) { OpenMode openMode; long num2; lock (phone) { openMode = OpenMode.None; switch (openmode) { case FileAccess.Read: openMode = OpenMode.Read; break; case FileAccess.Write: openMode = OpenMode.Write; break; case FileAccess.ReadWrite: throw new NotImplementedException("Read+Write not (yet) implemented"); } int num = MobileDeviceBase.AFCFileRefOpen(phone.AFCHandle, Encoding.UTF8.GetBytes(path), (ulong)((long)openMode), out num2); if (num != 0 && num != 0) { LogViewer.LogEvent(0, "**ERROR: " + path); throw new IOException("AFCFileRefOpen failed with error " + num.ToString()); } } return(new XEFileInfo(phone, num2, openMode)); }
// Token: 0x06000138 RID: 312 RVA: 0x00008518 File Offset: 0x00006718 public static ProductInfo GetProductInfoForDevice(iPhoneXE device) { string productType = device.CopyDeviceValue("ProductType"); string deviceColor = device.CopyDeviceValue("DeviceColor"); string enclosureColor = device.CopyDeviceValue("DeviceEnclosureColor"); device.CopyDeviceValue("ProductVersion"); ProductInfo productInfo = new ProductInfo(); productInfo.DiscoverModel(productType); productInfo.DiscoverColor(deviceColor, enclosureColor); return(productInfo); }
// Token: 0x06000085 RID: 133 RVA: 0x0000579C File Offset: 0x0000399C public XEPathInfo(iPhoneXE device, string fullPath, string service, bool isAppRoot = false) { this.Device = device; this._fullPath = fullPath; this.Service = service; bool flag = !(service == "com.apple.afc") && !(service == "com.apple.afc2"); if ((fullPath == "/" && flag) || isAppRoot) { this._isDirEnum = EnumFolderOrFile.Folder; this._propertiesDict = new Dictionary <string, string>(); this._propertiesDict.Add("st_blocks", "0"); this._propertiesDict.Add("st_ifmt", "S_IFDIR"); } else { this._propertiesDict = device.GetFileInfo(this._fullPath, service); } }
// Token: 0x06000084 RID: 132 RVA: 0x00005784 File Offset: 0x00003984 public static XEFileInfo OpenWrite(iPhoneXE phone, string path) { return(XEFileInfo.Open(phone, path, FileAccess.Write)); }
// Token: 0x06000083 RID: 131 RVA: 0x0000576C File Offset: 0x0000396C public static XEFileInfo OpenRead(iPhoneXE phone, string path) { return(XEFileInfo.Open(phone, path, FileAccess.Read)); }
// Token: 0x06000074 RID: 116 RVA: 0x0000209B File Offset: 0x0000029B private XEFileInfo(iPhoneXE phone, long handle, OpenMode mode) { this.phone = phone; this.mode = mode; this.handle = handle; }