AfxPathIsContentTypefunction
Determines if a file's registered content type matches the specified content type.
Syntax
FUNCTION AfxPathIsContentType (BYREF wszPath AS CONST WSTRING, BYREF wszContentType AS CONST WSTRING) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
wszPath | A string that contains the file whose content type will be compared. | |
wszContentType | A string that contains the content type string to which the file's registered content type will be compared. |
Return value
Returns nonzero if the file's registered content type matches wszContentType, or zero otherwise.
Description
Determines if a file's registered content type matches the specified content type. This function obtains the content type for the specified file type and compares that string with the wszContentType. The comparison is not case-sensitive.
Example
DIM b AS BOOLEAN = AfxPathIsContentType("C:\TEST\bar.txt", "text/plain") ' output: true DIM b AS BOOLEAN = AfxPathIsContentType("C:\TEST\bar.txt", "image/gif") ' output: false
Reference
- Include file
AfxPath.inc - Defined in AfxNova/AfxPath.inc:442
- Documented in String Management/Path and Url Procedures.md
- Topic: Path and Url procedures