curl -X GET 'https://generativelanguage.googleapis.com/v1beta/environments/env_abc123/files/src' \
-H "x-goog-api-key: $GEMINI_API_KEY"
from google import genai
client = genai.Client()
response = client.environments.files.list(
environment=created.id,
path="src",
)
for file in response.files or []:
print(file.name, file.type, file.size_bytes)
import {GoogleGenAI} from '@google/genai';
const ai = new GoogleGenAI({});
const response = await ai.environments.files.list({
environment: created.id,
path: 'src',
});
for (const file of response.files ?? []) {
console.log(file.name, file.type, file.size_bytes);
}