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 void Rename_dossier(Dossier dossier, string name) { if (dossier.GetDroitacces().Equals("RW") || dossier.GetDroitacces().Equals("W")) { // dossier.SetNom(name); } else { return; } }
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 "); } }
public fichier Creation_fichier(Dossier directory, string name, string format, Utulisateur user, int i) { if (Exists(directory, name)) { return(null); } else { db.insertfile(directory, user, format, name, d, 1, directory.GetDroitacces()); fichier newfile = new fichier(name, format, user, directory, db.lastindexf()); directory.Setlistfichier(newfile); //db.insertfile(directory, user, format, name, d, 1, directory.GetDroitacces()); return(newfile); } }