4D v14.3

Document type

Home

 
4D v14.3
Document type

Document type 


 

Document type ( document ) -> Function result 
Parameter Type   Description
document  String in Document name
Function result  String in Windows file extension (1 to 3-character string) or Mac OS file type (4-character string)

The use of Mac OS file types is obsolete under Mac OS X. Like Windows, file identification is now based on the suffix of its name (see the System Documents section). For compatibility's sake, it nevertheless remains possible to read the Mac OS type of documents when it has been specified.

The Document type command returns the type of the document whose name or pathname you pass in document.

On Windows, Document type returns the file extension of the document (i.e. 'DOC' for a Microsoft Word document, 'EXE' for an executable file, and so on) or the corresponding Mac OS-based 4 characters file type if this latter has been mapped with its equivalent Windows file extension by 4D (i.e. 'TEXT' for the 'TXT' file extension) or by a prior call to MAP FILE TYPES.

On Macintosh, Document type returns, if specified, the 4-characters file type of the document (i.e. 'TEXT' for a Text document, 'APPL' for a double-clickable application and so on).

 
PROPERTIES 

Product: 4D
Theme: System Documents
Number: 528

This command is deprecated and should not be used anymoreMac OS specificWindows specific

 
HISTORY 

Modified: 4D v11 SQL

 
SEE ALSO 

Document creator
GET DOCUMENT PROPERTIES
MAP FILE TYPES
SET DOCUMENT TYPE

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)