legacy/IDLv4tov5/
fdecomp.pro
top fdecomp
fdecomp, filename, disk, dir, name, qual, version, OSfamily=OSfamily
NAME: FDECOMP PURPOSE: Routine to decompose a file name for any operating system CALLING SEQUENCE: FDECOMP, filename, disk, dir, name, qual, version, [OSFamily = ] INPUT: filename - string file name, scalar OUTPUTS: All the output parameters are scalar strings disk - disk name, always '' on a Unix machine, scalar string dir - directory name, scalar string name - file name, scalar string qual - qualifier, set equal to the characters beyond the last "." version - version number, always '' on a non-VMS machine, scalar string OPTIONAL INPUT KEYWORD: OSFamily - one of the four scalar strings specifying the operating system: 'vms','windows','MacOS' or 'unix'. If not supplied, then !VERSION.OS_FAMILY is used to determine the OS. EXAMPLES: Consider the following file names Unix: file = '/rsi/idl40/avg.pro' VMS: file = '$1$dua5:[rsi.idl40]avg.pro;3 Mac: file = 'Macintosh HD:Programs:avg.pro' Windows: file = 'd:\rsi\idl40\avg.pro' then IDL> FDECOMP, file, disk, dir, name, qual, version will return the following Disk Dir Name Qual Version Unix: '' '/rsi/idl40/' 'avg' 'pro' '' VMS: '$1$dua5' '[RSI.IDL40]' 'avg' 'pro' '3' Mac: 'Macintosh HD' ':Programs:' 'avg' 'pro' '' Windows: 'd:' \rsi\idl40\ 'avg' 'pro' '' NOTES: (1) All tokens are removed between 1) name and qual (i.e period is removed) 2) qual and ver (i.e. VMS semicolon is removed) (2) On VMS the filenames "MOTD" and "MOTD." are distinguished by the fact that qual = '' for the former and qual = ' ' for the latter. ROUTINES CALLED: Function GETTOK() HISTORY version 1 D. Lindler Oct 1986 Include VMS DECNET machine name in disk W. Landsman HSTX Feb. 94 Converted to Mac IDL, I. Freedman HSTX March 1994 Converted to IDL V5.0 W. Landsman September 1997
Parameters
- filename
- disk
- dir
- name
- qual
- version
Keywords
- OSfamily
File attributes
Modification date: | Tue Oct 1 14:16:37 2013 |
Lines: | 236 |