Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. REBOL[
  2. auteur: "Jardin_Zen"
  3. nom: "FTPBase"
  4. version: 0.1
  5. ]
  6.  
  7. system/schemes/ftp/passive: true
  8.  
  9. FtpBase: make object![
  10. user: none
  11. password: none
  12. hote: none
  13. ftp: none
  14. filesOnServer: none
  15. command: none
  16. margin: " "
  17. route: none
  18.  
  19. connect: make function! [user password hote][
  20.  
  21. user: ask " Nom d'utilisation >>>"
  22. password: ask " Mot de passe >>>"
  23. hote: ask " Nom d'hote >>>"
  24.  
  25. ftp: ftp://u58397286:240889@s326359202.onlinehome.fr/3Dleaf/
  26.  
  27. ]
  28.  
  29. dir: make function! [][
  30.  
  31. foreach file read %.[
  32. info: info? file
  33. print [margin file margin info/size margin info/date margin info/type]
  34. route: file
  35. ]
  36.  
  37. ]
  38.  
  39. list: make function! [][
  40.  
  41. foreach file read ftp [
  42. info: info? file
  43. print [margin file]
  44. ]
  45.  
  46. ]
  47.  
  48. transfer: make function! [chaine] [
  49.  
  50. print chaine
  51.  
  52. ]
  53.  
  54. ]
  55.  
  56. jardinZen: make FtpBase[
  57.  
  58. while [command != "exit"][
  59.  
  60. command: ask ">>>"
  61.  
  62. if(command != "")[
  63. liste: parse command none
  64. command: first liste
  65. ]
  66.  
  67. switch/default command [
  68. "connect" [
  69. connect user password hote
  70. ]
  71. "dir" [
  72. dir
  73. ]
  74. "list" [
  75. list
  76. ]
  77. "road" [
  78. print what-dir
  79. ]
  80. "transfer" [
  81. transfer liste/2
  82. ]
  83. ][ ]
  84.  
  85. ]
  86.  
  87. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement