---
title: "isFileWriteable"
canonical: "https://help.vicon.com/space/Shogun112/31238859/isFileWriteable"
format: markdown
---
# Description

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

## Functional area

Disk I/O

# Command syntax

## Syntax

|  |
| --- |
| `isFileWriteable fileID` |

### Arguments

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

### 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 write mode
if( `isFileWriteable $fileID` == true ) 
   print "Can write to the file";
else 
 print "Cannot write to the file";
```

# Additional information

## Related commands

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