package xrdio
import "go-hep.org/x/hep/xrootd/xrdio"
Package xrdio provides a File type that implements various interfaces from the io package.
Index ¶
- type File
- func Open(name string) (*File, error)
- func OpenFrom(fs xrdfs.FileSystem, name string) (*File, error)
- func (f *File) Close() error
- func (f *File) Name() string
- func (f *File) Read(data []byte) (int, error)
- func (f *File) ReadAt(data []byte, offset int64) (int, error)
- func (f *File) Seek(offset int64, whence int) (int64, error)
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Write(data []byte) (int, error)
- func (f *File) WriteAt(data []byte, offset int64) (int, error)
- type URL
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File wraps a xrdfs.File and implements the following interfaces:
- io.Closer
- io.Reader
- io.Writer
- io.ReaderAt
- io.WriterAt
- io.Seeker
- fs.File
func Open ¶
Open opens the name file, where name is the absolute location of that file (xrootd server address and path to the file on that server.)
Example:
f, err := xrdio.Open("root://server.example.com:1094//some/path/to/file")
func OpenFrom ¶
func OpenFrom(fs xrdfs.FileSystem, name string) (*File, error)
OpenFrom opens the file name via the given filesystem handle. name is the absolute path of the wanted file on the server.
Example:
f, err := xrdio.OpenFrom(fs, "/some/path/to/file")
func (*File) Close ¶
Close implements io.Closer.
func (*File) Name ¶
Name returns the name of the file.
func (*File) Read ¶
Read implements io.Reader.
func (*File) ReadAt ¶
ReadAt implements io.ReaderAt.
func (*File) Seek ¶
Seek implements io.Seeker
func (*File) Stat ¶
func (*File) Write ¶
Write implements io.Writer.
func (*File) WriteAt ¶
WriteAt implements io.WriterAt.
type URL ¶
type URL struct { Addr string // address (host [:port]) of the server User string // user name to use to log in Path string // path to the remote file or directory }
URL stores an absolute reference to a XRootD path.
func Parse ¶
Parse parses name into an xrootd URL structure.
Source Files ¶
parse.go xrdio.go
- Version
- v0.37.1 (latest)
- Published
- Jun 3, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 1 day ago –
Tools for package owners.