1 /* local.c Copyright 1992-2000 by Michael Temari All Rights Reserved
3 * This file is part of ftp.
6 * 01/25/96 Initial Release Michael Temari, <Michael@TemWare.Com>
20 static char line2
[512];
22 static void dodir(char *path
, int full
);
26 if(getcwd(line2
, sizeof(line2
)) == (char *)NULL
)
27 printf("Could not determine local directory. %s\n", strerror(errno
));
29 printf("Current local directory: %s\n", line2
);
42 if(readline("Path: ", line2
, sizeof(line2
)) < 0)
48 printf("Could not change local directory. %s\n", strerror(errno
));
63 if(readline("Path: ", line2
, sizeof(line2
)) < 0)
69 printf("Could not make directory %s. %s\n", path
, strerror(errno
));
71 printf("Directory created.\n");
84 if(readline("Path: ", line2
, sizeof(line2
)) < 0)
90 printf("Could not remove directory %s. %s\n", path
, strerror(errno
));
92 printf("Directory removed.\n");
113 (void) system("$SHELL");
118 static void dodir(path
, full
)
122 static char cmd
[128];
123 static char name
[32];
128 sprintf(cmd
, "ls -l %s > %s", path
, name
);
130 sprintf(cmd
, "ls %s > %s", path
, name
);
133 sprintf(cmd
, "more %s", name
);
135 sprintf(cmd
, "rm %s", name
);