file

package
v0.0.0-...-4a740ba Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHashToFileName

func AddHashToFileName(file protocol.File)

func FilePathParts

func FilePathParts(uriPath string) (parts []string)

func FindByRelativeFrom

func FindByRelativeFrom(file protocol.File, relativePath string) (desireFile protocol.File)

func IsPathDirectory

func IsPathDirectory(uriPath string) bool

Types

type URI

type URI struct {
	// contains filtered or unexported fields
}

URI implement protocol.URI and protocol.FileURI interface

func (*URI) CompressType

func (uri *URI) CompressType() string

func (*URI) Domain

func (uri *URI) Domain() string

func (*URI) Extension

func (uri *URI) Extension() string

func (*URI) Init

func (uri *URI) Init(u string)

func (*URI) IsDirectory

func (uri *URI) IsDirectory() bool

func (*URI) Marshal

func (uri *URI) Marshal() (data []byte)

Marshal enecodes and return whole file data!

func (*URI) MarshalTo

func (uri *URI) MarshalTo(data []byte) []byte

MarshalTo enecodes whole file data to given data and return it with new len!

func (*URI) MediaType

func (uri *URI) MediaType() string

func (*URI) Name

func (uri *URI) Name() string

func (*URI) NameWithoutExtension

func (uri *URI) NameWithoutExtension() string

func (*URI) Path

func (uri *URI) Path() string

func (*URI) PathParts

func (uri *URI) PathParts() []string

func (*URI) Rename

func (uri *URI) Rename(newName string)

Rename just rename the file name

func (*URI) Scheme

func (uri *URI) Scheme() string

func (*URI) URI

func (uri *URI) URI() string

func (*URI) Unmarshal

func (uri *URI) Unmarshal(data []byte) (err protocol.Error)

Unmarshal save given data to the file. It will overwritten exiting data.

Jump to

Keyboard shortcuts

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