public void Deplacer_Dossier(Dossier pathd, Dossier d) { if (!d.Exists(d.GetNom(), pathd.Getlistdir())) { if (d.GetDroitacces().Equals("RW") || d.GetDroitacces().Equals("RWX")) { if (d.GetEmplacement() == null) { d.GetProprietaire().Getlistdirlist().Remove(d); } else { d.GetEmplacement().Getlistofdir().Remove(d); } d.SetEmplacement(pathd); pathd.Setlisd(d); } else { return; } } else { return; } }
public string parentstring(Dossier director) { if (director.GetEmplacement() != null) { string g = director.GetNom().Trim() + "-" + director.GetEmplacement().GetNom().Trim() + "-"; return(parentstring(director.GetEmplacement()) + g); } return(null); }
public string Supprimer_dossier(Dossier directory, bool u) { string ok = null, nok = null; List <Dossier> list = new List <Dossier>(); if (!u) { list = directory.GetProprietaire().Getlistdirlist(); } if (u) { list = directory.GetEmplacement().Getlistofdir(); } ok = "your directory was deleted !"; nok = "you can't !"; int stop = list.Count; if (directory.GetDroitacces().Equals("RW")) { list.Remove(directory); db.deletedirectory(directory.Getid()); return(ok); } else { return(nok + ", you don't have the right "); } }