TIWAppInfo //IntraWeb 12.2.15 開始使用 TIWAppInfo 來獲取應用的相關信息, 和 IWServerController、WebApplication 的某些屬性有重復 TIWAppCache //IntraWeb 14.0.29 新增, 可以方便處理緩存文件; 之前有類似的功能, 如: IWServerController.NewCacheFile {兩個類提供的都是 class 方法, 使用時無須實例化}
class function GetAppFullFileName: string class function GetAppFileName: string class function GetAppLogFileName: string class function GetAppPath: string class function GetAppName: string class function GetSystemPath: string class function GetTempPath: string class function GetCurrentPath: string class function GetComputerName: string class function GetFileInfo(const aFileName: string; aFileInfo: TFileInfo): string class function GetAppVersion: string
uses IW.Common.AppInfo; procedure TIWForm1.IWButton1Click(Sender: TObject); var str: string; i: Integer; begin IWMemo1.Lines.Add(TIWAppInfo.GetAppFullFileName); IWMemo1.Lines.Add(TIWAppInfo.GetAppFileName); IWMemo1.Lines.Add(TIWAppInfo.GetAppLogFileName); IWMemo1.Lines.Add(TIWAppInfo.GetAppPath); IWMemo1.Lines.Add(TIWAppInfo.GetAppName); IWMemo1.Lines.Add(TIWAppInfo.GetSystemPath); IWMemo1.Lines.Add(TIWAppInfo.GetTempPath); IWMemo1.Lines.Add(TIWAppInfo.GetCurrentPath); IWMemo1.Lines.Add(TIWAppInfo.GetComputerName); IWMemo1.Lines.Add(TIWAppInfo.GetAppVersion); IWMemo1.Lines.Add('==============='); for i := 0 to 9 do begin str := TIWAppInfo.GetFileInfo(TIWAppInfo.GetSystemPath + 'NotePad.exe', TFileInfo(i)); IWMemo1.Lines.Add(str); end; IWMemo1.Lines.Add('==============='); end;
class function NewTempFileName: string // class function AddFileToCache(aOwner: TObject; const aFileName: string; const aContentType: string; const aCacheType: TCacheType): string // class procedure NewCacheStream(aOwner: TObject; const aContentType: string; aCacheType: TCacheType; out ACacheStream: TCacheStream; out aFileHRef: string) // class procedure NewAppCacheStream(aOwner: TObject; const aContentType: string; out ACacheStream: TCacheStream; out aFileHRef: string) // class procedure NewSessionCacheStream(aOwner: TObject; const aContentType: string; out ACacheStream: TCacheStream; out aFileHRef: string) // class procedure NewFormCacheStream(aOwner: TObject; const aContentType: string; out ACacheStream: TCacheStream; out aFileHRef: string) // class function StreamToCacheFile(aOwner: TObject; AStream: TStream; const aContentType: string; const aCacheType: TCacheType): string // class function GraphicToCacheFile(aOwner: TObject; AGraphic: TGraphic; const aCacheType: TCacheType; const PreferPNG: Boolean): string // class function GraphicToCacheFile(aOwner: TObject; AGraphic: TGraphic; imgType: TIWImageOutput; const aCacheType: TCacheType): string // class function ResourceToCacheFile(aOwner: TObject; const aResourceName: string; const aContentType: string; const aCacheType: TCacheType): string // class function ClearCache(ACacheList: TStrings): Integer //
//待續...