utils

package
v0.0.0-...-404c704 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentProcessWorkingDir

func GetCurrentProcessWorkingDir() (string, error)

GetCurrentProcessWorkingDir returns the absolute path of the running process.

func GetDataFolder

func GetDataFolder(name string, version string) string

func TryClearExtensionScriptsDirectoriesAndSettingsFilesExceptMostRecent

func TryClearExtensionScriptsDirectoriesAndSettingsFilesExceptMostRecent(scriptsDirectory string,
	runtimeSettingsDirectory string,
	extensionName string,
	mostRecentSequenceNumberFinished uint64,
	runtimeSettingsRegexFormatWithAnyExtName string,
	runtimeSettingsLastSeqNumFormatWithAnyExtName string) error

Try empty runtime settings files for an extension except last, delete scripts except last. runtimeSettingsRegexFormatWithAnyExtName - regex identifying all settings files- example. "\\d+.settings", "RunCommandName.\\d+.settings" runtimeSettingsLastSeqNumFormatWithAnyExtName - example. "%s.settings", "RunCommandName.%s.settings"

func TryClearRegexMatchingFilesExcept

func TryClearRegexMatchingFilesExcept(directory string, regexFileNamePattern string,
	exceptFileName string, deleteFiles bool) error

Try clear files whose file names match with a regular expression except the filename passed in exceptFileName argument. If deleteFiles is true, files will be deleted, else they will be emptied without deleting.

func TryDeleteDirectoriesExcept

func TryDeleteDirectoriesExcept(parentDirectory string, exceptDirectoryName string) error

Try delete all directories in parentDirectory excepth directory by name 'exceptDirectoryName'

Types

This section is empty.

Jump to

Keyboard shortcuts

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