Beispiel #1
0
        /// <summary>
        /// return the path of a folder
        /// </summary>
        /// <param name="tt">la liste des dossiers</param>
        /// <returns>path</returns>
        public String getRoot(List <Dossier> tt)
        {
            Dossier temp = this.getDosById(tt, this.parent);
            String  path = this.nomRep;

            if (temp != null)
            {
                while (temp != null)
                {
                    path = path.Insert(0, temp.nomRep + @"\");
                    temp = temp.getDosById(tt, temp.parent);
                }
            }
            return(path);
        }
Beispiel #2
0
        public void copieFolderTo(Dossier folder, Dossier parent)
        {
            Dossier folder2 = new Dossier(folder.NomRep, parent.id_d, DateTime.Now, true);

            if (folder.getSubDos() != null)
            {
                foreach (Dossier sons in folder.getSubDos())
                {
                    copieFolderTo(sons, folder2);
                }
            }
            else
            {
                new Dossier(folder.NomRep, folder2.getDos(folder2.getAll(), parent.nomRep).Id_d, DateTime.Now, true);
            }
            if (folder.getSubFic() != null)
            {
                foreach (Fichier f in folder.getSubFic())
                {
                    copieFileTo(f, folder2);
                }
            }
        }
Beispiel #3
0
 public void copieFileTo(Fichier file, Dossier parent)
 {
     new Fichier(file.NomFic, file.Extension, parent.id_d, DateTime.Now, true);
 }
Beispiel #4
0
 public Boolean Copier(Dossier dest)
 {
     return(false);
 }