utils/utils library

Functions

computeFileSha1Hash(File file) Sha1
Creates a Sha1 from a file
computeSha1Hash(Uint8List bytes) Sha1
Creates a Sha1 hash from bytes data
createCommitSha({required String branchName, required String message, required int noOfObjects, required DateTime commitedAt}) Sha1
Sha1 algorithm on a Commit
fullPathFromDir({required String relativePath, required String directoryPath}) String
Attaches a relativePath to a directoryPath
isValidBranchName(String? branchName) bool
Function to validate a Branch name and takes a branchName
relativePathFromDir({required String directoryPath, required String path}) String
Returns a relative path from a directoryPath for path
shouldAddPath(String path, {String pattern = star}) bool
path starts with Platform.pathSeparator as a relative path from the Repositoryparent dir
shouldIgnorePath(String path, List<String> ignoredPatterns) bool
path starts with Platform.pathSeparator as a relative path from the Repository parent dir
stripBeginningPathSeparatorPath(String path, {String? pathSeparator}) String
Strips leading pathSeparator from path if exists