home *** CD-ROM | disk | FTP | other *** search
- /* Copyright Ammonoosuc Technology Inc., 1992 */
-
- /*
- This command file will display on stdout, suitable for
- redirection, a list of the names of Extended Attributes
- associated with a file or subdirectory.
- */
-
- do while (1 = 1)
- say 'Enter an existing file or subdirectory name'
- pull fname rest
- if length(fname) <> 0 then leave
- end /* do */
- do while (1 = 1)
- say 'Is this a file or a subdirectory? Enter F or D.'
- pull fdir rest
- if ((length(fdir) <> 0) & ((substr(fdir,1,1) = 'F') | (substr(fdir,1,1) = 'D'))) then leave
- end /* do */
- fdir = substr(fdir,1,1)
- if (fdir = 'F') then do
- pathname = stream(fname,'c','query exists')
- if length(pathname) = 0 then do
- say 'File' fname 'does not exist.'
- exit
- end /* Do */
- end /* Do */
- else pathname = fname
- call RxFuncAdd 'FetchEA', 'RexxEA', 'FetchEA'
- rcode = FetchEA(pathname,EAnames,EAstrings)
- if length(rcode) <> 0 then do
- say 'Error message from FetchEA is' rcode
- exit
- end /* Do */
- if EAnames.0 = 0 then do
- say 'There are no associated Extended Attributes.'
- call RxFuncDrop 'FetchEA'
- exit
- end /* Do */
- do i = 1 to EAnames.0
- say 'Extended Attribute name is ' EAnames.i
- end /* do */
- call RxFuncDrop 'FetchEA'
- exit