본문 바로가기
#포트폴리오 [Portfolio]/SystemKit (오픈소스)

🗂 [Guide] SKProcess

by cy_mos 2022. 9. 18.
반응형

🗂 SKProcess

SKProcess는 macOS 운영체제 환경을 기반으로 Process Class를 사용하여 스크립트 (Script) 또는 응용 프로그램 (Application)을 실행할 수 있습니다.

Example Source

SKProcess 예제 소스코드는 아래와 같습니다.

let arguments: Array<String> = ["-e", "use", "-i", "extensionPath"]
SKProcess.shared.run(launchPath: "launchPath", arguments: arguments, waitUntilExit: true)

let standardError: Pipe = Pipe()
let arguments: [String] = ["-a", "-vvv", "-t", "install", "atPath"]
SKProcess.shared.run(launchPath: "/usr/sbin/spctl", arguments: arguments, standardError: standardError, terminationHandler: terminationHandler)

License

SystemKit is released under the MIT license. See LICENSE for details.

MIT License

Copyright (c) 2022 ChangYeop-Yang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
반응형

'#포트폴리오 [Portfolio] > SystemKit (오픈소스)' 카테고리의 다른 글

🗂 [Guide] SKProcessMonitor  (0) 2022.10.24
🗂 [Guide] SKSignal  (0) 2022.10.24
🗂 [Guide] SKPermission  (0) 2022.09.28
🗂 [Guide] SKFinderExtension  (0) 2022.09.18
🗂 [Guide] SKUserDefault  (0) 2022.09.18

댓글