---
title: "isFileReadable"
canonical: "https://help.vicon.com/space/Shogun114/196387105/isFileReadable"
format: markdown
---
# Description

Use this command to determine if a file was opened in Read mode, i.e. for reading data from. Files that are opened in read mode cannot be written to, and vice-versa.

## Functional area

Disk I/O

# Command syntax

## Syntax

|  |
| --- |
| `isFileReadable fileID` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `fileID` | int |  | ID of file previously opened with [fileOpen](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196387286) |

### Flags

None

> Macro (scroll-pagebreak)

## Return value

boolean

## Examples

```plaintext
int $fileID;
// Obtain file ID earlier do some operation to the file
// ... 
// See if the file was opened in "Read Mode"
if( `isFileReadable $fileID` == true ) 
    print "Can read from the file";
  else 
   print "Cannot read from the file";

```

# Additional information

## Related commands

- [fileOpen](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196387286)