sync.gds {gdsfmt} | R Documentation

## Synchronize a GDS file

### Description

Write the data cached in memory to disk.

### Usage

    sync.gds(gdsfile)

### Arguments

`gdsfile` | An object of class `gds.class`, a GDS file

### Details

For better performance, Data in a GDS file are usually cached in memory. Keep in mind that the new file may not actually be written to disk, until `closefn.gds` or `sync.gds` is called. Anyway, when R shuts down, all GDS files created or opened would be automatically closed.

### Value

None.

### Author(s)

Xiuwen Zheng

### References

http://github.com/zhengxwen/gdsfmt

### See Also

`createfn.gds`, `openfn.gds`

### Examples

    # cteate a GDS file
    f <- createfn.gds("test.gds")

    node <- add.gdsn(f, "int", val=1:10000)
    put.attr.gdsn(node, "missing.value", 10000)

    sync.gds(f)

    f
    get.attr.gdsn(node)

    # close the GDS file
    closefn.gds(f)

    # delete the temporary file
    unlink("test.gds", force=TRUE)

[Package gdsfmt version 1.22.0 Index]