# cloudos-gitee-fs **Repository Path**: peiiii/cloudos-gitee-fs ## Basic Information - **Project Name**: cloudos-gitee-fs - **Description**: 以Gitee仓库为后端、模拟node的文件系统 API - **Primary Language**: TypeScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-28 - **Last Updated**: 2024-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: Git, Inbrowser-filesystem, giteefs, browser, FileSystem ## README

@cloudos/gitee-fs

Node file system API in browser backed by Gitee repositories.

### Built With * typescript * @clodos/gitee-api ## Getting Started 1. Install this library `npm i @cloudos/gitee-fs` or `yarn add @cloudos/gitee-fs`. 2. Using the fs api in your code; ```js import {GiteeFS} from '@cloudos/gitee-fs'; const setup=async()=>{ await GiteeFS.init({accessToken: "you gitee access token"}) const {fs,fsPromises}=await GiteeFS.import(); (window as any).fs=fs; (window as any).fsPromises=fsPromises; // now you can use with "fs.readdir(path,console.log)" etc. } setup(); ``` Once the GiteeFs is initialized, metadata like `owner` and `repo` and `accessToken` will be stored in the indexedDB. If you need to reconfigure the metadata, using: ```js // A prompt box will pup up for inputing metadata. GiteeFS.config(); ``` ### Usage Check the apis defined in the code ([lib/index.d.ts](lib/index.d.ts)). ## License MIT License.

(back to top)