podman

Форк
0
50 строк · 1.2 Кб
1
/*
2

3
	Open a file, directory, or URI using the OS's default
4
	application for that object type.  Optionally, you can
5
	specify an application to use.
6

7
	This is a proxy for the following commands:
8

9
	         OSX: "open"
10
	     Windows: "start"
11
	 Linux/Other: "xdg-open"
12

13
	This is a golang port of the node.js module: https://github.com/pwnall/node-open
14

15
*/
16
package open
17

18
/*
19
	Open a file, directory, or URI using the OS's default
20
	application for that object type. Wait for the open
21
	command to complete.
22
*/
23
func Run(input string) error {
24
	return open(input).Run()
25
}
26

27
/*
28
	Open a file, directory, or URI using the OS's default
29
	application for that object type. Don't wait for the
30
	open command to complete.
31
*/
32
func Start(input string) error {
33
	return open(input).Start()
34
}
35

36
/*
37
	Open a file, directory, or URI using the specified application.
38
	Wait for the open command to complete.
39
*/
40
func RunWith(input string, appName string) error {
41
	return openWith(input, appName).Run()
42
}
43

44
/*
45
	Open a file, directory, or URI using the specified application.
46
	Don't wait for the open command to complete.
47
*/
48
func StartWith(input string, appName string) error {
49
	return openWith(input, appName).Start()
50
}
51

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.