Ejemplo n.º 1
0
 public RecursoTorrent(String nombre, String fullpath)
 {
     listaTorrents = new List <ArchivoTorrent>();
     Arch          = new ArchivoXml(descripcion = LeerXml(fullpath), fullpath + "/index.xml");
     cargarLista(fullpath);
     path        = fullpath;
     this.nombre = nombre;
 }
Ejemplo n.º 2
0
 private void CrearRec(String nombre, List <ArchivoTorrent> l, String descripcion)
 {
     Directory.CreateDirectory(path);
     foreach (ArchivoTorrent arch in l)
     {
         FileInfo file = new FileInfo(arch.getPath());
         if (!(File.Exists(path + "/" + file.Name)))
         {
             File.Copy(arch.getPath(), path + "/" + file.Name);
         }
     }
     listaTorrents    = l;
     this.nombre      = nombre;
     this.descripcion = descripcion;
     Arch             = new ArchivoXml(descripcion, path + "/index.xml");
     Arch.escribirXml();
 }