---
name: "Geo::GDAL::FFI::VSI::File"
section: "3pm"
platform: "linux"
package: "libgeo-gdal-ffi-perl"
version: "0.12-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Geo::GDAL::FFI::VSI::File"
---

# Geo::GDAL::FFI::VSI::File(3pm)

A GDAL virtual file

## NAME

Geo::GDAL::FFI::VSI::File - A GDAL virtual file

## SYNOPSIS

## DESCRIPTION

## METHODS

### Open

```
 my $vsifile = Geo::GDAL::FFI::VSI::File->Open($name, $access);
```

Open a virtual file. `$name` is the name of the file to open. `$access` is 'r', 'r+', 'a', or 'w'. 'r' is the default.

Returns a Geo::GDAL::FFI::VSI::File object.

### Close

Closes the file handle. Is done automatically when the object is destroyed.

### Read($len)

Read `$len` bytes from the file. Returns the bytes in a Perl string. `$len` is optional and by default 1.

### Write($buf)

Write the Perl string `$buf` into the file. Returns the number of successfully written bytes.

## LICENSE

This software is released under the Artistic License. See perlartistic.

## AUTHOR

Ari Jolma - Ari.Jolma at gmail.com

## SEE ALSO

Geo::GDAL::FFI

Alien::gdal, FFI::Platypus, \<http://www.gdal.org\>
