octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: equivalent of fullfile (of matlab) in octave.


From: Etienne Grossmann
Subject: Re: equivalent of fullfile (of matlab) in octave.
Date: Mon, 18 Oct 1999 20:56:21 +0100 (GMT+0100)

  Hello again,

maybe fullfile would be better as :

##  barely tested *and* undocumented
##
## s = fullfile(...)
function s = fullfile(...)
  filesep = "/" ;               # Change this for non-unix
  if nargin--, 
    s = va_arg(); 
  else 
    s=""; 
    return
  end
  while nargin--,
    s=[s,filesep,va_arg()];
  end 
  t='';
  while !strcmp(t,s), 
    t=s;
    s=strrep(t,"/./","/");
    s=strrep(s,"//","/");
  end
endfunction


  This is tentative code, use with care and do backups.

  Etienne



reply via email to

[Prev in Thread] Current Thread [Next in Thread]