mirror of
https://github.com/electron/electron.git
synced 2026-01-27 16:28:23 -05:00
* 📝 Update `README-ko.md` * Remove Korean readme specified header. * Add Indonesia community link. * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Mark untranslated docs * 📝 Update Korean docs as upstream [ci skip] * 📝 Update Korean docs as upstream [ci skip] * 📝 Add untranslated files [ci skip] * 📝 Update Korean docs as upstream [ci skip] * 📝 Update Korean docs as upstream * 📝 Update `README-ko.md` * Remove Korean readme specified header. * Add Indonesia community link. * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Update Korean docs as upstream * 📝 Mark untranslated docs * 📝 Update Korean docs as upstream [ci skip] * 📝 Update Korean docs as upstream [ci skip] * 📝 Add untranslated files [ci skip] * 📝 Update Korean docs as upstream [ci skip] * 📝 Update Korean docs as upstream * 📝 Correct readme name [ci skip] * 📝 Update Korean docs as upstream [ci skip]
3.5 KiB
3.5 KiB
shell
파일과 URL을 각 기본 애플리케이션을 통해 관리합니다.
shell 모듈은 데스크톱 환경 통합에 관련한 유틸리티를 제공하는 모듈입니다.
다음 예시는 설정된 URL을 유저의 기본 브라우저로 엽니다:
const {shell} = require('electron');
shell.openExternal('https://github.com');
Methods
shell 모듈은 다음과 같은 메서드를 가지고 있습니다:
shell.showItemInFolder(fullPath)
fullPathString
지정한 파일을 탐색기에서 보여줍니다. 가능한 경우 탐색기 내에서 파일을 선택합니다.
shell.openItem(fullPath)
fullPathString
지정한 파일을 데스크톱 기본 프로그램으로 엽니다.
shell.openExternal(url[, options])
urlStringoptionsObject (optional) macOSactivateBoolean -true로 설정하면 애플리케이션을 바로 활성화 상태로 실행합니다. 기본값은true입니다.
제공된 외부 프로토콜 URL을 기반으로 데스크톱의 기본 프로그램으로 엽니다. (예를 들어
mailto: URL은 유저의 기본 이메일 에이전트로 URL을 엽니다.) 애플리케이션이 해당 URL을
열 수 있을 때 true를 반환합니다. 아니라면 false를 반환합니다.
역자주: 탐색기로 폴더만 표시하려면 'file://경로'와 같이 지정하여 열 수 있습니다.
shell.moveItemToTrash(fullPath)
fullPathString
지정한 파일을 휴지통으로 이동합니다. 작업의 성공여부를 boolean 형으로 리턴합니다.
shell.beep()
비프음을 재생합니다.
shell.writeShortcutLink(shortcutPath[, operation], options) Windows
shortcutPathStringoperationString (optional) - 기본값은create이며 다음 값 중 한 가지가 될 수 있습니다:create- 새 바로가기를 생성하고 필요하다면 덮어씁니다.update- 이미 존재하는 바로가기의 특정한 속성을 갱신합니다.replace- 이미 존재하는 바로가기를 덮어씁니다. 바로가기가 존재하지 않으면 실패합니다.
optionsObjecttargetString - 이 바로가기로부터 실행될 대상입니다.cwdString (optional) - 작업 디렉토리입니다. 기본값은 없습니다.argsString (optional) - 이 바로가기로부터 실행될 때target에 적용될 인수 값입니다. 기본값은 없습니다.descriptionString (optional) - 바로가기의 설명입니다. 기본값은 없습니다.iconString (optional) - 아이콘의 경로입니다. DLL 또는 EXE가 될 수 있습니다.icon과iconIndex는 항상 같이 설정되어야 합니다. 기본값은 없으며target의 아이콘을 사용합니다.iconIndexInteger (optional) -icon이 DLL 또는 EXE일 때 사용되는 아이콘의 리소스 ID이며 기본값은 0입니다.appUserModelIdString (optional) - 애플리케이션 사용자 모델 ID입니다. 기본값은 없습니다.
shortcutPath에 바로가기 링크를 생성합니다. 바로가기 생성에 성공하면 true를
반환하고 그렇지 않으면 false를 반환합니다.
shell.readShortcutLink(shortcutPath) Windows
shortcutPathString
shortcutPath에 위치한 바로가기 링크를 해석합니다. shell.writeShortcutLink
메서드의 options에 묘사된 속성을 포함하는 객체를 반환합니다.
오류가 발생하면 예외가 throw됩니다.