예제 #1
0
        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;
            }
        }
예제 #2
0
        public Dossier Creat_sdirec(string name, DateTime d, Dossier user, Utulisateur newuser, int id)
        {
            Dossier[] list = user.Getlistdir();
            if (Exists(name, list))
            {
                return(null);
            }
            else

            {
                db.Insertdirectoryd(name, newuser.GetNom(), "RW", d, 0, user.GetNom(), id);
                Dossier newdirectory = new Dossier(name, d, user.GetProprietaire(), user, db.lastindex());
                user.Setlisd(newdirectory);


                return(newdirectory);
            }
        }