home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / GENERAL.DI$ / LS.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  367 b   |  22 lines

  1. function l=ls(arg)
  2. %LS    Directory listing.
  3.  
  4. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  5.  
  6. if isunix
  7.    if nargin == 0
  8.       [s,l] = unix('ls');
  9.    else
  10.       [s,l] = unix(['ls ', arg]);
  11.    end
  12. else
  13.    c = computer;
  14.    if strcmp(c(1:2),'PC')
  15.       if nargin == 0
  16.          eval('dir');
  17.       else
  18.          eval(['dir ' arg]);
  19.       end
  20.    end
  21. end
  22.