;+ ; Describes the file class. It contains informations ; about a file. ; ; :Author: ; Gaƫlle Boisnard ; ; :History: ; 2004/07/23: Created ; ; 2004/07/23: Last Edit ;- ;---------------------------------------------------- FUNCTION file::init, filename, path ;---------------------------------------------------- monthstr=['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] self.path=path self.name=filename res=file_info(path+filename) self.modifdates=res.mtime date=systime(0, self.modifdates) month=strtrim(string(where(monthstr eq strmid(date, 4, 3))+1), 2) if (strlen(month) eq 1) then begin month='0'+month endif if (strmid(date, 8, 1) eq '-') then begin day='0'+strmid(date, 9, 1) endif else begin day=strmid(date, 8, 2) endelse self.modifdatestr=strmid(date, 20, 4)+'/'+month+'/'+day+' '+strmid(date, 11, 8) return, 1 end ;---------------------------------------------------- PRO file::cleanup ;---------------------------------------------------- end ;---------------------------------------------------- FUNCTION file::getname ;---------------------------------------------------- return, self.name end ;---------------------------------------------------- FUNCTION file::getdatestr ;---------------------------------------------------- return, self.modifdatestr end ;---------------------------------------------------- FUNCTION file::getdates ;---------------------------------------------------- return, self.modifdates end ;+ ; Describes the file object. It contains informations ; about a file. ;- PRO file__define define={FILE, $ name:'', $ modifdates:0L, $ modifdatestr:'', $ path:''} end