__CAPGO_KEEP_0__
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-downloader`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/downloader/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 섹션bun add @capgo/capacitor-downloaderbunx cap syncimport
import 섹션import { CapacitorDownloader } from '@capgo/capacitor-downloader';API 개요
API 개요 섹션download
다운로드 섹션__CAPGO_KEEP_0__을 시작합니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
const task = await Downloader.download({ id: 'my-download', url: 'https://example.com/file.pdf', destination: 'downloads/file.pdf'});pause
__CAPGO_KEEP_2____CAPGO_KEEP_0__를 일시 중단합니다. 중단된 위치에서 다시 다운로드할 수 있습니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.pause({} as { id: string });resume
__CAPGO_KEEP_3____CAPGO_KEEP_0__를 다시 시작합니다. 중단된 위치에서 계속 다운로드합니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.resume({} as { id: string });stop
__CAPGO_KEEP_4____CAPGO_KEEP_0__를 중단하고 영구적으로 취소합니다. 다운로드한 데이터는 삭제됩니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.stop({} as { id: string });checkStatus
__CAPGO_KEEP_5__다운로드 중인 현재 상태를 확인하세요.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.checkStatus({} as { id: string });getFileInfo
getFileInfo다운로드 한 파일에 대한 정보를 얻으세요.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.getFileInfo({} as { path: string });타입 참조
타입 참조DownloadOptions
다운로드 옵션다운로드를 시작하기 위한 설정 옵션입니다.
export interface DownloadOptions { /** Unique identifier for this download task */ id: string; /** URL of the file to download */ url: string; /** Local file path where the download will be saved */ destination: string; /** Optional HTTP headers to include in the request */ headers?: { [key: string]: string }; /** Network type requirement for download */ network?: 'cellular' | 'wifi-only'; /** Download priority level */ priority?: 'high' | 'normal' | 'low';}DownloadTask
다운로드 작업다운로드 작업의 현재 상태와 진행 상황을 나타냅니다.
export interface DownloadTask { /** Unique identifier for the download task */ id: string; /** Download progress from 0 to 100 */ progress: number; /** Current state of the download */ state: 'PENDING' | 'RUNNING' | 'PAUSED' | 'DONE' | 'ERROR';}실제 데이터 원천
실제 데이터 원천이 페이지는 플러그인의 src/definitions.ts공개 API이 업스트림에서 변경될 때 다시 싱크를 실행하세요.
Getting Started에서 계속
Getting StartedGetting Started를 사용하여 계획 대시보드 및 __CAPGO_KEEP_0__ 작업을 계획하려면 Using @API/__CAPGO_KEEP_1__-downloader Using @capgo/capacitor-downloader Using @capgo/capacitor-downloader API 개요 API 개요의 구현 세부 사항에 대해 소개 소개의 구현 세부 사항에 대해 API 키 API 키의 구현 세부 사항에 대해, 및 장치 장치의 구현 세부 사항에 대해.