3
using System.Collections.Generic;
7
namespace Transmission {
9
public class TorrentDirectoryItem: Item, ITorrentEntry {
11
private TorrentItem _torrent;
12
private TorrentDirectoryItem _parent;
14
private IList<Item> _files;
16
public TorrentDirectoryItem(TorrentItem torrent, TorrentDirectoryItem parent, string name) {
20
_files = new List<Item>();
23
public TorrentItem Torrent {
24
get { return _torrent; }
27
public IEnumerable<TorrentFileItem> GetFiles() {
28
foreach (ITorrentEntry entry in _files)
29
foreach (TorrentFileItem file in entry.GetFiles())
33
public override string Name {
37
public override string Description {
38
get { return string.Empty; }
41
public override string Icon {
42
get { return "folder"; }
45
public IList<Item> Files {
46
get { return _files; }
51
if (_parent != null) {
52
return _parent.Path + '/' + _name;
60
get { return "file://" + Path; }