Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REBOL[
- auteur: "Jardin_Zen"
- nom: "FTPBase"
- version: 0.1
- ]
- system/schemes/ftp/passive: true
- FtpBase: make object![
- user: none
- password: none
- hote: none
- ftp: none
- filesOnServer: none
- command: none ;
- margin: " "
- route: none ;
- connect: make function! [user password hote][
- user: ask " Nom d'utilisation >>>"
- password: ask " Mot de passe >>>"
- hote: ask " Nom d'hote >>>"
- ftp: ftp://u58397286:240889@s326359202.onlinehome.fr/3Dleaf/
- ]
- dir: make function! [][
- foreach file read %. [
- info: info? file
- print [margin file margin info/size margin info/date margin info/type]
- route: file
- ]
- ]
- list: make function! [][
- ; listing files on ftp
- foreach file read ftp [
- info: info? file
- print [margin file]
- ]
- ]
- upload: make function! [fichier][
- print fichier.
- ]
- ]
- jardinZen: make FtpBase[
- while [command != "exit"][
- command: ask ">>>"
- liste: parse command none
- command: first liste
- switch/default liste/1 [
- "connect" [
- connect user password hote
- ]
- "dir" [
- dir
- ]
- "list" [
- list
- ]
- "road" [
- print what-dir
- ]
- "upload" [
- upload liste/1
- ]
- ][ ]
- ]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement