pcspath

package
v3.5.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pcspath 网盘路径工具包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Escape

func Escape(pcspath string) string

Escape 转义字符串的空白符号, 小括号, 中括号

func EscapeBracketOne

func EscapeBracketOne(s string) string

EscapeBracketOne 转义中括号, 加一个反斜杠

func EscapeBracketTwo

func EscapeBracketTwo(s string) string

EscapeBracketTwo 转义中括号, 加两个反斜杠

func EscapeStrings

func EscapeStrings(ss []string)

EscapeStrings 转义字符串数组所有元素的空格, 小括号, 中括号

func SplitAll

func SplitAll(pcspath string) (elem []string)

SplitAll 分割路径, "/"为分隔符

Types

type PCSPath

type PCSPath struct {
	WorkdirDestination *string // 指向工作目录
	SubPath            string  // 相对于工作目录的子目录
}

PCSPath 百度 PCS 路径

func NewPCSPath

func NewPCSPath(workdirDestination *string, pcsSubPath string) *PCSPath

NewPCSPath 返回 PCSPath 指针对象

func (*PCSPath) AbsPathNoMatch

func (pp *PCSPath) AbsPathNoMatch() string

AbsPathNoMatch 返回绝对路径, 不检测通配符

func (*PCSPath) CleanPath

func (pp *PCSPath) CleanPath()

CleanPath 过滤处理目录

func (*PCSPath) EscapeBracket

func (pp *PCSPath) EscapeBracket()

EscapeBracket 转义文件名中的中括号

func (*PCSPath) Match

func (pp *PCSPath) Match(pcspaths ...string) (matchedPCSPaths []string)

Match 检测 pcspaths 的通配符, 返回匹配成功的 matchedPCSPaths

func (*PCSPath) SetSubPath

func (pp *PCSPath) SetSubPath(pcsSubPath string)

SetSubPath 设置子目录

Jump to

Keyboard shortcuts

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