    

 ## On this page

  

 

 # Interface: ParseableFile

 Last update: 22.06.2026 

**Package:** `com.phoenix_int.aserver.util.scriptwrapper.api`

**All Known Subinterfaces:**

[`InputFile`](InputFile.md), [`OutputFile`](OutputFile.md)

**All Known Implementing Classes:**

[`AbstractFile`](AbstractFile.md), [`CAEOutputFile`](CAEOutputFile.md), [`PHXRowFieldFile`](PHXRowFieldFile.md), [`XPathFile`](XPathFile.md)

---

**Declaration:**

```java
public interface ParseableFile

```

Interface for files (not file variables) used in script wrappers

## Nested Class Summary

Modifier and TypeInterface and Description`static class`[`ParseableFile.Mode`](ParseableFile.Mode.md)  
File mode. Moved to type-safe enum from legacy integer constants## Method Summary

Modifier and TypeMethod and Description`void``backup()`  
Backup the file on disk.`void``close()`   
Close the file and free up resources`void``delete()`   
Delete the file from disk.`void``readTemplate()`   
Read the template.`void``setFileToGenerateOrParse(java.lang.String fileName)`   
Set the file to generate or to parse, depending on the mode`void``setTempEmbedded(java.lang.String option)`   
This method applies only to ModelCenter and has no function in ModelCenter Remote Execution`void``setTemplateFile(java.lang.String templateFileName)`   
Set the template file to read.`void``setVariable(java.lang.String name, java.lang.String value)`   
Sets the value of a variable## Method Detail

### backup

```java
void backup()

```

Backup the file on disk. File is at the same location with ".bac" appended to the end. If a file by that name already exists, it is deleted prior to moving.

### close

```java
void close()

```

Close the file and free up resources

### delete

```java
void delete()

```

Delete the file from disk.

### readTemplate

```java
void readTemplate()
           throws java.io.IOException,
                  com.phoenix_int.aserver.util.PHXInvalidFormatException,
                  PHXNoSuchTokenException,
                  java.lang.IllegalAccessException,
                  java.lang.InstantiationException,
                  PHXNumberFormatException,
                  PHXBookmarkNotFoundException,
                  PHXSectionNotFoundException

```

Read the template. In MCRE 7.1, this method was changed to never throw any exceptions. Reading the templates allows you to fill in default values if you can, but is not mandatory.

**Throws:**

- `java.io.IOException`
- `com.phoenix_int.aserver.util.PHXInvalidFormatException`
- `PHXNoSuchTokenException`
- `java.lang.IllegalAccessException`
- `java.lang.InstantiationException`
- `PHXNumberFormatException`
- [`PHXBookmarkNotFoundException`](PHXBookmarkNotFoundException.md)
- [`PHXSectionNotFoundException`](PHXSectionNotFoundException.md)

### setFileToGenerateOrParse

```java
void setFileToGenerateOrParse(java.lang.String fileName)

```

Set the file to generate or to parse, depending on the mode

**Parameters:**

- `fileName` -

### setTempEmbedded

```java
void setTempEmbedded(java.lang.String option)

```

This method applies only to ModelCenter and has no function in ModelCenter Remote Execution

### setTemplateFile

```java
void setTemplateFile(java.lang.String templateFileName)

```

Set the template file to read. If the template file is not specified, it defaults to the file that is parsed or generated, for [`Mode.PARSE`](ParseableFile.Mode.md) or [`Mode.GENERATE`](ParseableFile.Mode.md), respectively.

**Parameters:**

- `templateFileName` - file name

### setVariable

```java
void setVariable(java.lang.String name,
                 java.lang.String value)
          throws PHXNoSuchObjectException

```

Sets the value of a variable

**Parameters:**

- `name` - variable name
- `value` - variable value as a string

**Throws:**

- `PHXNoSuchObjectException`