public static Hacknet.Folder AddRandomFile(this Hacknet.Folder self, object name = null, uint?id = null) => self.AddFile(name as string ?? Hacknet.FileEntry.filenames[ (int)Math.Min( (name as long?).GetValueOrDefault(), Hacknet.FileEntry.filenames.Count - 1 ) ], Hacknet.FileEntry.fileData[ (int)Math.Min( id.Value, Hacknet.FileEntry.filenames.Count - 1) ]);
public static Hacknet.Folder AddExecutableFile(this Hacknet.Folder self, string name, int id) => self.AddFile(name, ExeInfoManager.GetExecutableInfo(id).Data);
public static Hacknet.Folder AddFile(this Hacknet.Folder self, string name, uint?dataIndex = null) => self.AddFile(name, Hacknet.FileEntry.fileData[(int)Math.Min(dataIndex.Value, Hacknet.FileEntry.filenames.Count - 1 )]);
public static Hacknet.Folder AddExecutableFile(this Hacknet.Folder self, string name, string id) => self.AddFile(name, ExeInfoManager.GetExecutableInfo(id).Data ?? Executable.Handler.GetStandardFileDataBy(id, true));
public static Hacknet.Folder AddFile(this Hacknet.Folder self, string name, Executable.IInterface data) => self.AddFile(name, Executable.Handler.GetStandardFileDataBy(data));