go-gfal2

go-gfal2

Go bindings for gfal2

Name Last Update
examples/gfal2 Loading commit data...
.gitignore Loading commit data...
README.md Loading commit data...
cfuncs.go Loading commit data...
config.go Loading commit data...
directory.go Loading commit data...
file.go Loading commit data...
gerror.go Loading commit data...
gfal2.go Loading commit data...
logger.go Loading commit data...
metadata.go Loading commit data...
staging.go Loading commit data...
staging_test.go Loading commit data...
transfer.go Loading commit data...

go-gfal2

This package provides bindings for gfal2 for the Go language. It requires gfal2 to be already installed, and must be localizable via pkg-config.

Example usage

Have a look at the examples/gfal2 directory to see some examples.

package main

import (
    "gitlab.cern.ch/dmc/go-gfal2"
)

func main() {
    context, err := gfal2.NewContext()
    if err != nil {
        log.Fatal(err)
    }
    defer context.Close()

    stat, err := gfal2.Stat("gsiftp://host/path")
    if err != nil {
        log.Fatal(err)
    }

    log.Printf("Mode: %s\n", stat.Mode().String())
}