Documentation ¶
Overview ¶
Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func BlockID(path string, index int) string
- func EndsWithDot(path string) bool
- func GetOwnerGroup(info os.FileInfo) (string, string)
- func GetRandID(randNum int) string
- func GroupName(gid int) string
- func HasAccess(callerUid, callerGid, fileUid, fileGid uint32, perm uint32, mask uint32) bool
- func IfNotExist(err error) bool
- func IsError(err syscall.Errno) bool
- func KeyHash(s string) uint64
- func LookupGroup(name string) int
- func LookupUser(name string) int
- func Max(a, b int) int
- func MaxUInt64(a, b uint64) uint64
- func Min(a, b int) int
- func MinUInt32(a, b uint32) uint32
- func MinUInt64(a, b uint64) uint64
- func StatModeToFileMode(mode int) os.FileMode
- func ToSyscallErrno(err error) syscall.Errno
- func UserName(uid int) string
- type Buffer
- func (b *Buffer) Buffer() []byte
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) Get(l int) []byte
- func (b *Buffer) Get16() uint16
- func (b *Buffer) Get32() uint32
- func (b *Buffer) Get64() uint64
- func (b *Buffer) Get8() uint8
- func (b *Buffer) HasMore() bool
- func (b *Buffer) Left() int
- func (b *Buffer) Len() int
- func (b *Buffer) Put(v []byte)
- func (b *Buffer) Put16(v uint16)
- func (b *Buffer) Put32(v uint32)
- func (b *Buffer) Put64(v uint64)
- func (b *Buffer) Put8(v uint8)
- func (b *Buffer) Seek(p int)
- func (b *Buffer) SetBytes(buf []byte)
- type LeakyBuf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndsWithDot ¶
func HasAccess ¶
HasAccess tests if a caller can access a file with permissions `perm` in mode `mask`
func IfNotExist ¶ added in v0.14.5
func LookupGroup ¶
func LookupUser ¶
func StatModeToFileMode ¶
func ToSyscallErrno ¶
err默认为syscall.Errno, 当不能转换时返回syscall.ENOTSUP
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is a buffer to read/write integers.
func NewNativeBuffer ¶
NewNativeBuffer utility to create *Buffer of given size with nativeEndian
func ReadBuffer ¶
ReadBuffer utility to create *Buffer from slice of bytes