---
title: "file:typeof — Type of file"
description: "iXML command file:typeof: Type of file."
canonical_url: "https://www.zeyos.com/ixml/ref/file-typeof"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/file-typeof.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# file:typeof — Type of file

FILE:TYPEOF returns the type of a file or directory.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Result variable name |
| filename | string |  | Filename |

### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- binding: var; type: string

### Examples

```xml
<file:write filename="./test/ixml.inc">iXML</file:write>

<file:typeof var="type" filename="./test/ixml.inc"/>

<if value1="$type" func="=" value2="file">
	<output>Filename refers to a regular file!</output>
</if>

<!-- Filename refers to a regular file! -->
```
