AnyMux

Getting Started

Installation

pnpm add @anymux/google-drive

Basic Usage

import { GoogleDriveFileSystem } from "@anymux/google-drive";

const fs = new GoogleDriveFileSystem({
  accessToken: "your-oauth2-token",
});

// List root
const entries = await fs.readDir("/");

// Read a file
const content = await fs.readFile("/document.txt");

// Upload a file
await fs.writeFile("/upload.txt", new TextEncoder().encode("Hello, Drive!"));