files

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: GPL-3.0, GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

  This file is part of go-palletone.
  go-palletone is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  go-palletone is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
  along with go-palletone.  If not, see <http://www.gnu.org/licenses/>.

* @author PalletOne core developers <dev@pallet.one>
* @date 2018

File and Folder operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyAll

func CopyAll(dst, src string) error

CopyAll Copy all files from source to destination

func CopyFile

func CopyFile(dst, src string) error

Copy on file

func IsDir

func IsDir(path string) bool

Check path is a folder or not 判断所给路径是否为文件夹

func IsEmpty

func IsEmpty(name string) (bool, error)

Check folder is empty or not

func IsExist

func IsExist(path string) bool

Check file Is Exist 判断文件是否存在,存在返回true,不存在返回false

func IsFile

func IsFile(path string) bool

Check path is a file or not 判断所给路径是否为文件

func MakeDirAndFile

func MakeDirAndFile(filePath string) error

MakeDirAndFile the path of file ,if the path is not exist. if the path is stdout or stderr, don't create file

func RemoveFileAndEmptyFolder

func RemoveFileAndEmptyFolder(filePath string) error

Remove this file ,and if the parent folder is empty remove parent folder.

Types

This section is empty.

Jump to

Keyboard shortcuts

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