file

package
v0.0.0-...-f950530 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DgrzDirName = ".dgrz"

BASE GRAP DIR FOR ALL STATE FILES

View Source
const DirLockFileName = ".__dirlock__"
View Source
const GrapplicationIdFileName = "ID"
View Source
const HeadFileName = "HEAD"
View Source
const HeadsDirName = "heads"
View Source
const IPFSAPIPortCounterFileName = ".ipfs-api-port-counter"
View Source
const IndexFileName = ".index"
View Source
const IndexFormatVersion = uint32(1)
View Source
const JSONLDDocumentName = ".document.jsonld"
View Source
const LOCK_FILE_SUFFIX = ".lock"
View Source
const MasterBranchName = "main"
View Source
const ObjectsDirName = "objects" // where file objects are cached
View Source
const RefsDirName = "refs"
View Source
const ResourceCacheSignature = "RESC"

Variables

This section is empty.

Functions

func DataDirPath

func DataDirPath(ctxt context.Context) string

func DirExists

func DirExists(path string) bool

func DotDirPath

func DotDirPath(ctxt context.Context) string

func FileExists

func FileExists(path string) bool

func GetDirs

func GetDirs(root string) ([]string, error)

func GrapplicationDatasetDirPath

func GrapplicationDatasetDirPath(ctxt context.Context, datasetName string) (string, error)

func GrapplicationDgrzDirPath

func GrapplicationDgrzDirPath(ctxt context.Context) (string, error)

func GrapplicationDirPath

func GrapplicationDirPath(ctxt context.Context) (string, error)

func GrapplicationExist

func GrapplicationExist(ctxt context.Context, grappDirPath string) bool

func GrapplicationObjectsDirPath

func GrapplicationObjectsDirPath(ctxt context.Context) (string, error)

func GrapplicationRefsDirPath

func GrapplicationRefsDirPath(ctxt context.Context) (string, error)

func GrapplicationRefsHeadsDirPath

func GrapplicationRefsHeadsDirPath(ctxt context.Context) (string, error)

func IndexFilePath

func IndexFilePath(ctxt context.Context) (string, error)

func Touch

func Touch(path string) error

Creates an empty file at 'path' similar to Unix touch command

func WriteCommitHashToCurrentBranchHeadFile

func WriteCommitHashToCurrentBranchHeadFile(ctxt context.Context, grappDirPath string, commitHash string) error

func WriteHeadFile

func WriteHeadFile(ctxt context.Context, grappDirPath string, branchName string) error

func WriteToFileAtomic

func WriteToFileAtomic(readerFunc func() (io.Reader, error), path string) (int64, error)

Writes contents of Reader object to 'path' atomically i.e. no other writers can write at the same time. An attempt for other writers to do so simultaneously will result inn a 'TryAgain' error being returned RETURNS PathError or TryAgain error types

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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