cddlmZmZddlZeeZdZdZdZdZ dZ e dd Z e d d Z e d d Ze ddZe ddZe ddZdZededdS))Flasksend_from_directoryN.cd}tj|D]?}tj|dz|zr d|d|d}n d|d|d}||z}@|S)N\z
  • ">)oslistdirpathisdir)folder file_list_strfilenamelis C:\dld\dldsv.pyroot_dir_file_listrsMJv&&++ 7==X- . . =>#>>(0>>>BB=#=='/===B%* c|ddkr|dd}t||dd}d}tj|D]}d|d|d|d}||z}|S)Nrrz
  • Download

    Directory listing


    r)rhtmls r create_htmlr#"s$     D KrrcDtttSr)r#rroot_dirrrrindexr&4s )(33 4 44rz/cTtdz|z}tt|SNr)r%r#r)sub_dirdir_names r sub_dir1_pager+9s'$(H )(33 4 44rz //cdSrr)rsub_dir2s r sub_dir2_pager.>Drz /c,tt|Sr)rr%)rs r download_rootr1Bs x 2 22rz//c<tdz|z}t||Sr()r%r)r)rr*s rdownload_subdir1r3Fs $(H x 2 22rz+///cdSrr)rr-rs rdownload_subdir2r5Kr/rizz0.0.0.0F)hostportdebug)flaskrrr __name__appr%rrr r#router&r+r.r1r3r5httpportrunrrrr?s,,,,,,,,  eHoo          $3555 555 -..  /. =333 '((33)(3 899  :9 YH511111r