comparison src/dirfns.cc @ 1957:0e6a0a271998

[project @ 1996-02-15 01:08:15 by jwe]
author jwe
date Thu, 15 Feb 1996 01:08:49 +0000
parents e62277bf5fe0
children 01e3ed56c415
comparison
equal deleted inserted replaced
1956:3496ec9bee35 1957:0e6a0a271998
305 error ("%s: %s", newdir.c_str (), strerror (errno)); 305 error ("%s: %s", newdir.c_str (), strerror (errno));
306 306
307 return cd_ok; 307 return cd_ok;
308 } 308 }
309 309
310 DEFUN_TEXT ("cd", Fcd, Scd, 10, 310 DEFUN_TEXT (cd, args, ,
311 "cd [dir]\n\ 311 "cd [dir]\n\
312 \n\ 312 \n\
313 change current working directory\n\ 313 change current working directory\n\
314 if no arguments are given, the current directory is changed to the\n\ 314 if no arguments are given, the current directory is changed to the\n\
315 users home directory") 315 users home directory")
351 351
352 DEFALIAS (chdir, cd); 352 DEFALIAS (chdir, cd);
353 353
354 // Get a directory listing. 354 // Get a directory listing.
355 355
356 DEFUN_TEXT ("ls", Fls, Sls, 10, 356 DEFUN_TEXT (ls, args, ,
357 "ls [options]\n\ 357 "ls [options]\n\
358 \n\ 358 \n\
359 print a directory listing") 359 print a directory listing")
360 { 360 {
361 Octave_object retval; 361 Octave_object retval;
400 return retval; 400 return retval;
401 } 401 }
402 402
403 DEFALIAS (dir, ls); 403 DEFALIAS (dir, ls);
404 404
405 DEFUN ("pwd", Fpwd, Spwd, 01, 405 DEFUN (pwd, , nargout,
406 "pwd (): print current working directory") 406 "pwd (): print current working directory")
407 { 407 {
408 Octave_object retval; 408 Octave_object retval;
409 string directory; 409 string directory;
410 410
431 } 431 }
432 432
433 return retval; 433 return retval;
434 } 434 }
435 435
436 DEFUN ("readdir", Freaddir, Sreaddir, 10, 436 DEFUN (readdir, args, ,
437 "readdir (NAME)\n\ 437 "readdir (NAME)\n\
438 \n\ 438 \n\
439 Return an array of strings containing the list of all files in the 439 Return an array of strings containing the list of all files in the
440 named directory. If sucessful, returns 0; otherwise an error message 440 named directory. If sucessful, returns 0; otherwise an error message
441 is printed.") 441 is printed.")
471 } 471 }
472 472
473 // XXX FIXME XXX -- should probably also allow second arg to specify 473 // XXX FIXME XXX -- should probably also allow second arg to specify
474 // mode. 474 // mode.
475 475
476 DEFUN ("mkdir", Fmkdir, Smkdir, 10, 476 DEFUN (mkdir, args, ,
477 "mkdir (NAME)\n\ 477 "mkdir (NAME)\n\
478 \n\ 478 \n\
479 Create the directory named by NAME. If successful, returns 0;\n\ 479 Create the directory named by NAME. If successful, returns 0;\n\
480 otherwise prints an error message.") 480 otherwise prints an error message.")
481 { 481 {
507 retval (0) = (double) status; 507 retval (0) = (double) status;
508 508
509 return retval; 509 return retval;
510 } 510 }
511 511
512 DEFUN ("rmdir", Frmdir, Srmdir, 10, 512 DEFUN (rmdir, args, ,
513 "rmdir (NAME)\n\ 513 "rmdir (NAME)\n\
514 \n\ 514 \n\
515 Remove the directory named by NAME. If successful, returns 0;\n\ 515 Remove the directory named by NAME. If successful, returns 0;\n\
516 otherwise prints an error message.") 516 otherwise prints an error message.")
517 { 517 {
543 retval (0) = (double) status; 543 retval (0) = (double) status;
544 544
545 return retval; 545 return retval;
546 } 546 }
547 547
548 DEFUN ("rename", Frename, Srename, 10, 548 DEFUN (rename, args, ,
549 "rename (FROM, TO)\n\ 549 "rename (FROM, TO)\n\
550 \n\ 550 \n\
551 Rename a file. If successful, returns 0;\n\ 551 Rename a file. If successful, returns 0;\n\
552 otherwise prints an error message and returns -1.") 552 otherwise prints an error message and returns -1.")
553 { 553 {