private void SendFiles(object obj) { try { DirectoryInfo Folders = new DirectoryInfo(DirLocation); if (!Folders.Exists) return; FileInfo[] Files = Folders.GetFiles("*.*"); foreach (FileInfo file in Files) { FileMgrFileInfo info = new FileMgrFileInfo(); info.FileName = file.Name.ToString(); info.Date = file.LastAccessTimeUtc.ToString(); info.Extension = file.Extension.ToString(); info.Size = file.Length.ToString(); info.FileLocation = DirLocation; Client.SendPacket(new S_FileMgrGetFiles(Client, info)); } }catch{} }
public S_FileMgrGetFiles(ClientConnect client, FileMgrFileInfo info) : base(client) { this.info = info; }