Documentation
¶
Index ¶
- Variables
- func PathExists(path string) bool
- type BaseFile
- func (f *BaseFile) Close() error
- func (f *BaseFile) CurrentSeek() (int64, error)
- func (f *BaseFile) File() *os.File
- func (f *BaseFile) MD5() ([]byte, error)
- func (f *BaseFile) Name() string
- func (f *BaseFile) Read(p []byte) (n int, err error)
- func (f *BaseFile) ReadFileAtOffset(offset int64, length int64) ([]byte, error)
- func (f *BaseFile) Seek(offset int64, whence int) (n int64, err error)
- func (f *BaseFile) Stat() (os.FileInfo, error)
- func (f *BaseFile) Update(from File)
- func (f *BaseFile) Write(p []byte) (n int, err error)
- type BasicFileSystem
- func (f *BasicFileSystem) CreateFile(path string) (File, error)
- func (f *BasicFileSystem) List(path string) (entries []*Entry, err error)
- func (f *BasicFileSystem) OpenFile(path string) (File, error)
- func (f *BasicFileSystem) Walk(path string, filter WalkFilter) (entries []*Entry, err error)
- func (f *BasicFileSystem) WalkIter(root string, filter WalkFilter) (iter.Seq[*Entry], error)
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) GetAccessedTime() string
- func (m *Entry) GetChildren() []*Entry
- func (m *Entry) GetCreatedTime() string
- func (m *Entry) GetModifiedTime() string
- func (m *Entry) GetName() string
- func (m *Entry) GetOwner() string
- func (m *Entry) GetPath() string
- func (m *Entry) GetPermissions() string
- func (m *Entry) GetRegular() bool
- func (m *Entry) GetSize() int64
- func (m *Entry) GetType() EntryType
- func (m *Entry) GetWpath() string
- func (e *Entry) IsDir() bool
- func (m *Entry) Marshal() (dAtA []byte, err error)
- func (m *Entry) MarshalTo(dAtA []byte) (int, error)
- func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Entry) ProtoMessage()
- func (m *Entry) ProtoSize() (n int)
- func (m *Entry) Reset()
- func (m *Entry) String() string
- func (m *Entry) Unmarshal(dAtA []byte) error
- func (m *Entry) XXX_DiscardUnknown()
- func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Entry) XXX_Merge(src proto.Message)
- func (m *Entry) XXX_Size() int
- func (m *Entry) XXX_Unmarshal(b []byte) error
- type EntryType
- type File
- type FileSystem
- type ListResp
- func (*ListResp) Descriptor() ([]byte, []int)
- func (m *ListResp) GetEntries() []*Entry
- func (m *ListResp) Marshal() (dAtA []byte, err error)
- func (m *ListResp) MarshalTo(dAtA []byte) (int, error)
- func (m *ListResp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListResp) ProtoMessage()
- func (m *ListResp) ProtoSize() (n int)
- func (m *ListResp) Reset()
- func (m *ListResp) String() string
- func (m *ListResp) Unmarshal(dAtA []byte) error
- func (m *ListResp) XXX_DiscardUnknown()
- func (m *ListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListResp) XXX_Merge(src proto.Message)
- func (m *ListResp) XXX_Size() int
- func (m *ListResp) XXX_Unmarshal(b []byte) error
- type WalkFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthEntry = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEntry = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEntry = fmt.Errorf("proto: unexpected end of group") )
View Source
var EntryType_name = map[int32]string{
0: "ENTRY_TYPE_UNKNOWN",
1: "ENTRY_TYPE_FILE",
2: "ENTRY_TYPE_DIR",
}
View Source
var EntryType_value = map[string]int32{
"ENTRY_TYPE_UNKNOWN": 0,
"ENTRY_TYPE_FILE": 1,
"ENTRY_TYPE_DIR": 2,
}
Functions ¶
func PathExists ¶
Types ¶
type BaseFile ¶
type BaseFile struct {
// contains filtered or unexported fields
}
func (*BaseFile) CurrentSeek ¶
func (*BaseFile) ReadFileAtOffset ¶
type BasicFileSystem ¶
type BasicFileSystem struct{}
func (*BasicFileSystem) CreateFile ¶
func (f *BasicFileSystem) CreateFile(path string) (File, error)
func (*BasicFileSystem) List ¶
func (f *BasicFileSystem) List(path string) (entries []*Entry, err error)
func (*BasicFileSystem) Walk ¶
func (f *BasicFileSystem) Walk(path string, filter WalkFilter) (entries []*Entry, err error)
func (*BasicFileSystem) WalkIter ¶
func (f *BasicFileSystem) WalkIter(root string, filter WalkFilter) (iter.Seq[*Entry], error)
type Entry ¶
type Entry struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"-"` Type EntryType `protobuf:"varint,2,opt,name=type,proto3,enum=filesystem.EntryType" json:"type,omitempty" yaml:"-"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty" yaml:"-"` Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty" yaml:"-"` Wpath string `protobuf:"bytes,5,opt,name=wpath,proto3" json:"wpath,omitempty" yaml:"-"` CreatedTime string `protobuf:"bytes,6,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty" yaml:"-"` ModifiedTime string `protobuf:"bytes,7,opt,name=modified_time,json=modifiedTime,proto3" json:"modified_time,omitempty" yaml:"-"` AccessedTime string `protobuf:"bytes,8,opt,name=accessed_time,json=accessedTime,proto3" json:"accessed_time,omitempty" yaml:"-"` Owner string `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty" yaml:"-"` Permissions string `protobuf:"bytes,10,opt,name=permissions,proto3" json:"permissions,omitempty" yaml:"-"` Regular bool `protobuf:"varint,11,opt,name=regular,proto3" json:"regular" yaml:"-"` Children []*Entry `protobuf:"bytes,12,rep,name=children,proto3" json:"children,omitempty" yaml:"-"` }
func (*Entry) Descriptor ¶
func (*Entry) GetAccessedTime ¶
func (*Entry) GetChildren ¶
func (*Entry) GetCreatedTime ¶
func (*Entry) GetModifiedTime ¶
func (*Entry) GetPermissions ¶
func (*Entry) GetRegular ¶
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
func (*Entry) XXX_DiscardUnknown ¶
func (m *Entry) XXX_DiscardUnknown()
func (*Entry) XXX_Marshal ¶
func (*Entry) XXX_Unmarshal ¶
type File ¶
type File interface { File() *os.File Name() string Stat() (os.FileInfo, error) Read(p []byte) (n int, err error) Write(p []byte) (n int, err error) Seek(offset int64, whence int) (n int64, err error) Update(from File) CurrentSeek() (int64, error) MD5() ([]byte, error) ReadFileAtOffset(offset int64, length int64) ([]byte, error) Close() error }
type FileSystem ¶
type FileSystem interface { List(path string) ([]*Entry, error) Walk(path string, filter WalkFilter) ([]*Entry, error) WalkIter(path string, filter WalkFilter) (iter.Seq[*Entry], error) OpenFile(path string) (File, error) CreateFile(path string) (File, error) }
func NewBasicFileSystem ¶
func NewBasicFileSystem() FileSystem
type ListResp ¶
type ListResp struct {
Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries" yaml:"-"`
}
func (*ListResp) Descriptor ¶
func (*ListResp) GetEntries ¶
func (*ListResp) MarshalToSizedBuffer ¶
func (*ListResp) ProtoMessage ¶
func (*ListResp) ProtoMessage()
func (*ListResp) XXX_DiscardUnknown ¶
func (m *ListResp) XXX_DiscardUnknown()
func (*ListResp) XXX_Marshal ¶
func (*ListResp) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.