dirlist

package
v0.29.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package dirlist contains the structures describing request and response for dirlist request used to obtain the contents of a directory.

Index

Constants

View Source
const RequestID uint16 = 3004

RequestID is the id of the request, it is sent as part of message. See xrootd protocol specification for details: http://xrootd.org/doc/dev45/XRdv310.pdf, 2.3 Client Request Format.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Options RequestOptions
	Path    string
	// contains filtered or unexported fields
}

Request holds the dirlist request parameters.

func NewRequest

func NewRequest(path string) *Request

NewRequest forms a Request according to provided path.

func (Request) MarshalXrd

func (o Request) MarshalXrd(wBuffer *xrdenc.WBuffer) error

MarshalXrd implements xrdproto.Marshaler.

func (*Request) Opaque

func (req *Request) Opaque() string

Opaque implements xrdproto.FilepathRequest.Opaque.

func (*Request) ReqID

func (req *Request) ReqID() uint16

ReqID implements xrdproto.Request.ReqID.

func (*Request) SetOpaque

func (req *Request) SetOpaque(opaque string)

SetOpaque implements xrdproto.FilepathRequest.SetOpaque.

func (*Request) ShouldSign

func (req *Request) ShouldSign() bool

ShouldSign implements xrdproto.Request.ShouldSign.

func (*Request) UnmarshalXrd

func (o *Request) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

UnmarshalXrd implements xrdproto.Unmarshaler.

type RequestOptions

type RequestOptions byte

RequestOptions specifies what should be returned as part of response.

const (
	None         RequestOptions = 0 // None specifies that no addition information except entry names is required.
	WithStatInfo RequestOptions = 2 // WithStatInfo specifies that stat information for every entry is required.
)

type Response

type Response struct {
	Entries      []xrdfs.EntryStat
	WithStatInfo bool
}

Response is a response for the dirlist request, which contains a slice of entries containing the entry name and the entry stat info, and a WithStatInfo flag indicating whether a request asked for a stat info.

func (Response) MarshalXrd

func (o Response) MarshalXrd(wBuffer *xrdenc.WBuffer) error

MarshalXrd implements xrdproto.Marshaler.

func (*Response) RespID

func (resp *Response) RespID() uint16

RespID implements xrdproto.Response.RespID.

func (*Response) UnmarshalXrd

func (o *Response) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

UnmarshalXrd implements xrdproto.Unmarshaler When stat information is supported by the server, the format is

".\n"
"0 0 0 0\n"
"dirname\n"
"id size flags modtime\n"
...
0

Otherwise, the format is the following:

"dirname\n"
...
0

See xrootd protocol specification, page 45 for further details.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL