base

module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT

README

base

Module with base operations for Go.

MIT License

Overview

This repository is:

  • Golang project to compile and run
  • Golang module/package to import
  • Generic helper bash scripts.
  • Documentation / How-To
  • Sass / CSS library
  • Java Script Library

Features

  • base/array - Array functions
  • base/console - Console functions
  • base/exe - Functions for the executable
  • base/file - File manipulation functions
  • base/text - Text functions
  • base/to - Formats convertion

Install

$ go mod download github.com/envidera/base@latest

About Versioning

Usage

need to write See auto-go-doc for now

base/file

str, err = file.Read(fileName)
str, err = file.ReadAll(path, ".txt", ".doc")
	
err = file.Copy(path, newPath)
err = file.Copy(fileName, newfileName)
err = file.CopyAll(path, newPath, ".txt", ".doc")

err = file.Move(path, newPath)
err = file.Move(fileName, newfileName)
err = file.MoveAll(path, newPath, ".txt", ".doc")

err = file.Rename(path, newPath)
err = file.Rename(filename, newfileName)

err = file.Del(path)
err = file.Del(fileName)
err = file.DelAll(path, ".txt", ".doc")

err = file.MkDir(path)

		
int, err = file.Write(filename, "str", ConfigWriteMode)
	example: _, err = Config().WriteMode.CreateOverwrite
Config().WriteMode

[]os.FileInfo, err = file.List(src)
 
err = file.Chmod(fileName, 0755)
err = file.Chmod(path, 0755)
err = file.ChmodAll(path, 0755, true, ".txt", ".doc")

*fileInfo, err = file.Info(fileName)
*fileInfo, err = file.Info(path)
	type fileInfo struct {
		Name       string
		Ext        string
		IsDir      bool
		Mode       os.FileMode
		Size       *Size
		TimeAccess time.Time
		TimeChange time.Time
		TimeModify time.Time
	}
		
*Size, error = file.GetDirSize(path)
	Size could be returned in Bytes, KBytes(), MBytes() or GBytes()

bool = file.Exist(filename)
bool = file.Exist(path)

Folder structure

  • doc documentation and license files
  • script/linux helper scripts for Linux

License

Released under the MIT License


ENVIDERA

envidera.com | Powered by Open Source Softwares

Directories

Path Synopsis
Functions helpers of the executable itself
Functions helpers of the executable itself

Jump to

Keyboard shortcuts

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