File or directory path. Relative paths are resolved against the filesystem working directory. For example, with a working directory of /app, GET /filesystem/workspace resolves to /app/workspace. To access the absolute path /workspace over HTTP, encode its leading slash as %2F: GET /filesystem/%2Fworkspace. The double-slash form GET /filesystem//workspace also addresses /workspace.
Recursive is true when files and subdirectories hold every level below
path (tree read with recursive=true). Older APIs ignore that parameter
and omit this field, so clients can tell a one-level listing apart.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Documentation","description":"Blaxel documentation: cloud sandboxes, AI agent hosting, MCP servers, batch jobs, and model gateway for building and deploying AI-powered applications.","colors":{"primary":"#F0652D","light":"#FD7B35","dark":"#F0652D"},"logo":{"light":"https://mintcdn.com/blaxel/Z-RIT2VoXMT2Aw7L/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Z-RIT2VoXMT2Aw7L\u0026q=85\u0026s=7a7cf1e3c766c77f97f32e5c0d4fd209","dark":"https://mintcdn.com/blaxel/Z-RIT2VoXMT2Aw7L/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=Z-RIT2VoXMT2Aw7L\u0026q=85\u0026s=17297eca3e92fe15a91eed262f17d659"},"favicon":"https://mintcdn.com/blaxel/nH6Nd4qmP2OsLhOO/favicon.svg?fit=max\u0026auto=format\u0026n=nH6Nd4qmP2OsLhOO\u0026q=85\u0026s=484b8f0ebe3fb56aef259d514eeaa18c","appearance":{"default":"system"},"background":{"color":{"dark":"#09090B"}},"navbar":{"links":[{"icon":"calendar","href":"/changelog","label":"Changelog"},{"icon":"robot","href":"/skills-mcp","label":"Agent Skill"},{"icon":"puzzle-piece","href":"https://blaxel.ai/integrations","label":"Integrations"},{"icon":"discord","href":"/Community","label":"Community"}],"primary":{"type":"button","label":"Blaxel Console","href":"https://app.blaxel.ai"}},"footer":{"socials":{"github":"https://github.com/blaxel-ai","linkedin":"https://www.linkedin.com/company/blaxel-ai","twitter":"https://x.com/blaxelai","discord":"https://discord.gg/CsWKUZUHFQ"}},"search":{"prompt":"Search Blaxel docs..."},"seo":{"metatags":{"og:type":"website","og:site_name":"Blaxel Documentation"},"indexing":"navigable"},"fonts":{"family":"Inter"},"integrations":{"posthog":{"apiKey":"phc_HGJ7t7Qa8cJJilL0CONU5se4vM6jU6nKFCuoCC9LSha","apiHost":"https://events.blaxel.ai"}},"banner":{"content":"Blaxel has joined Baseten to build the future of agentic infrastructure! [Read our announcement.](https://www.baseten.co/blog/blaxel-is-joining-baseten-to-build-the-future-of-agentic-cloud/)","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","cursor","devin","download-spec"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"calendar","href":"/changelog"},{"anchor":"Blaxel Skills \u0026 MCP","icon":"robot","href":"/skills-mcp"},{"anchor":"Integrations directory","icon":"puzzle-piece","href":"https://blaxel.ai/integrations"},{"anchor":"Community","icon":"discord","href":"/Community"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"blaxel","hasAudioNarration":false,"actualSubdomain":"blaxel","customDomains":["docs.blaxel.ai"],"gitSource":{"type":"github","owner":"blaxel-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":true,"edits":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee39344d50570c70f0d389","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Platform APIs Reference","count":179},{"language":"default","tag":"Management API","count":176},{"language":"default","tag":"Documentation","count":114},{"language":"default","tag":"Overview","count":75},{"language":"default","tag":"CLI Reference","count":73},{"language":"default","tag":"Commands","count":72},{"language":"default","tag":"Sandbox API Reference","count":44},{"language":"default","tag":"Troubleshooting","count":41},{"language":"default","tag":"Tutorials and Examples","count":35},{"language":"default","tag":"compute","count":35}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"support@blaxel.ai","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navbar .nav-logo{height:2.5rem;width:auto}#navbar:has(#banner){display:flex;flex-direction:column}#navbar:has(#banner)>.max-w-8xl{width:100%}#navbar:has(#banner)>div[aria-hidden=\"true\"]{display:none}#banner{position:relative;inset:auto;order:1;padding:1.25rem 3rem;background:transparent;font-size:0.9375rem;font-weight:400}#banner>div{width:100%;max-width:70rem;margin:0;padding:1rem 3.5rem 1rem 1.75rem;border:1px solid #394655;border-radius:0.75rem;background:radial-gradient(ellipse at 50% 0, rgb(99 216 226 / 12%), transparent 70%),\n linear-gradient(110deg, #121b29, #081827 52%, #141925);box-shadow:0 12px 32px -16px rgb(7 11 17 / 40%),\n inset 0 1px 0 rgb(255 255 255 / 5%)}#banner>button{right:max(4rem, calc((100% - 70rem) / 2 + 1rem))}#banner p{color:#dbdbdb!important;line-height:1.5}#banner a{display:inline-flex;align-items:center;gap:0.5rem;margin-left:0.75rem;color:#fff!important;text-decoration:none;white-space:nowrap}#banner a::after{content:\"\";width:1.25rem;height:1.25rem;background-color:#eb7229;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h12M10 4l5 5-5 5'/%3E%3C/svg%3E\") center / contain no-repeat}#banner a:hover{text-decoration:underline;text-decoration-color:#fff}#banner a:focus-visible{border-radius:2px;outline:2px solid #eb7229;outline-offset:4px}@media (max-width: 767px){#banner{padding:1rem;text-align:left}#banner>div{padding:1rem 2.75rem 1rem 1rem}#banner a{display:flex;width:fit-content;margin:0.375rem 0 0}#banner>button{top:1.75rem;right:1.75rem;transform:none}}"}],"page":{"pagePath":"api-reference/filesystem/get-file-or-directory-information","slug":"/api-reference/filesystem/get-file-or-directory-information","pageMetadata":{"title":"Get file or directory information","description":"Get content of a file or listing of a directory. Use Accept header to control response format for files.","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem/{path}","href":"/api-reference/filesystem/get-file-or-directory-information","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Get content of a file or listing of a directory. Use Accept header to control response format for files.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get file or directory information","description":"Get content of a file or listing of a directory. Use Accept header to control response format for files.","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem/{path}","href":"/api-reference/filesystem/get-file-or-directory-information","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Get content of a file or listing of a directory. Use Accept header to control response format for files.","parameters":["024ebc99-1e95-4433-b30d-eda4baa005aa","3eea6c68-7058-4d74-96e5-d1a9435c21c6"],"responses":{"200":"0a4ae7fd-49be-42c8-afe0-f72c34eddde7","404":"20d3b426-163e-43cf-bd88-89039a103879","422":"1b282ef4-6aab-473a-be05-8106b787406b","500":"f43be4d6-86ac-4b0f-9e59-9441d683dc71"},"summary":"Get file or directory information","tags":["filesystem"],"method":"get","type":"path","servers":["ca4390e1-f8de-4e19-891e-60b74edb6c39"],"security":["9f71ac97-1771-492d-a678-f6d8dd0273eb"],"path":"/filesystem/{path}","baseUrlOptions":["https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run"],"title":"Get file or directory information","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"024ebc99-1e95-4433-b30d-eda4baa005aa":{"description":"File or directory path. Relative paths are resolved against the filesystem working directory. For example, with a working directory of /app, GET /filesystem/workspace resolves to /app/workspace. To access the absolute path /workspace over HTTP, encode its leading slash as %2F: GET /filesystem/%2Fworkspace. The double-slash form GET /filesystem//workspace also addresses /workspace.","in":"path","name":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"File or directory path. Relative paths are resolved against the filesystem working directory. For example, with a working directory of /app, GET /filesystem/workspace resolves to /app/workspace. To access the absolute path /workspace over HTTP, encode its leading slash as %2F: GET /filesystem/%2Fworkspace. The double-slash form GET /filesystem//workspace also addresses /workspace.","uniqueKey":"","typeLabel":"string"}},"3eea6c68-7058-4d74-96e5-d1a9435c21c6":{"description":"Force download mode for files","in":"query","name":"download","schema":{"type":"boolean","description":"Force download mode for files","uniqueKey":"","typeLabel":"boolean"}}},"responses":{"0a4ae7fd-49be-42c8-afe0-f72c34eddde7":{"description":"Directory listing","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["files","name","path","subdirectories"],"properties":{"files":{"items":{"properties":{"group":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].group","typeLabel":"string"},"lastModified":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].lastModified","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].name","typeLabel":"string"},"owner":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].owner","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].path","typeLabel":"string"},"permissions":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].permissions","typeLabel":"string"},"size":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].size","typeLabel":"integer"},"content":{"description":"Content is set only by a tree read with content=true, for regular files.","type":"string","uniqueKey":"oneOf.0.files.items.[INDEX].content","typeLabel":"string"}},"required":["group","lastModified","name","owner","path","permissions","size"],"type":"object","uniqueKey":"oneOf.0.files.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"oneOf.0.files","typeLabel":"object[]"},"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.name","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.path","typeLabel":"string"},"subdirectories":{"description":"@name Subdirectories","items":{"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.subdirectories.items.[INDEX].name","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.subdirectories.items.[INDEX].path","typeLabel":"string"}},"required":["name","path"],"type":"object","uniqueKey":"oneOf.0.subdirectories.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"oneOf.0.subdirectories","typeLabel":"object[]"},"recursive":{"description":"Recursive is true when files and subdirectories hold every level below\npath (tree read with recursive=true). Older APIs ignore that parameter\nand omit this field, so clients can tell a one-level listing apart.","type":"boolean","uniqueKey":"oneOf.0.recursive","typeLabel":"boolean"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["content","group","lastModified","name","owner","path","permissions","size"],"properties":{"content":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.content","typeLabel":"string"},"group":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.group","typeLabel":"string"},"lastModified":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.lastModified","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.name","typeLabel":"string"},"owner":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.owner","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.path","typeLabel":"string"},"permissions":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.permissions","typeLabel":"string"},"size":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.size","typeLabel":"integer"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"string","format":"binary","uniqueKey":"oneOf.2","typeLabel":"file"}],"uniqueKey":"","typeLabel":"object · object · file"},"examples":{"Example":{"title":"Example","value":{"files":[{"group":"\u003cstring>","lastModified":"\u003cstring>","name":"\u003cstring>","owner":"\u003cstring>","path":"\u003cstring>","permissions":"\u003cstring>","size":123,"content":"\u003cstring>"}],"name":"\u003cstring>","path":"\u003cstring>","subdirectories":[{"name":"\u003cstring>","path":"\u003cstring>"}],"recursive":true}}},"exampleType":"generated"},"application/octet-stream":{"schema":{"oneOf":[{"type":"object","required":["files","name","path","subdirectories"],"properties":{"files":{"items":{"properties":{"group":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].group","typeLabel":"string"},"lastModified":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].lastModified","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].name","typeLabel":"string"},"owner":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].owner","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].path","typeLabel":"string"},"permissions":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].permissions","typeLabel":"string"},"size":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.files.items.[INDEX].size","typeLabel":"integer"},"content":{"description":"Content is set only by a tree read with content=true, for regular files.","type":"string","uniqueKey":"oneOf.0.files.items.[INDEX].content","typeLabel":"string"}},"required":["group","lastModified","name","owner","path","permissions","size"],"type":"object","uniqueKey":"oneOf.0.files.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"oneOf.0.files","typeLabel":"object[]"},"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.name","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.path","typeLabel":"string"},"subdirectories":{"description":"@name Subdirectories","items":{"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.subdirectories.items.[INDEX].name","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.subdirectories.items.[INDEX].path","typeLabel":"string"}},"required":["name","path"],"type":"object","uniqueKey":"oneOf.0.subdirectories.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"oneOf.0.subdirectories","typeLabel":"object[]"},"recursive":{"description":"Recursive is true when files and subdirectories hold every level below\npath (tree read with recursive=true). Older APIs ignore that parameter\nand omit this field, so clients can tell a one-level listing apart.","type":"boolean","uniqueKey":"oneOf.0.recursive","typeLabel":"boolean"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["content","group","lastModified","name","owner","path","permissions","size"],"properties":{"content":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.content","typeLabel":"string"},"group":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.group","typeLabel":"string"},"lastModified":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.lastModified","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.name","typeLabel":"string"},"owner":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.owner","typeLabel":"string"},"path":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.path","typeLabel":"string"},"permissions":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.permissions","typeLabel":"string"},"size":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.1.size","typeLabel":"integer"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"string","format":"binary","uniqueKey":"oneOf.2","typeLabel":"file"}],"uniqueKey":"","typeLabel":"object · object · file"},"examples":{"Example":{"title":"Example","value":{"files":[{"group":"\u003cstring>","lastModified":"\u003cstring>","name":"\u003cstring>","owner":"\u003cstring>","path":"\u003cstring>","permissions":"\u003cstring>","size":123,"content":"\u003cstring>"}],"name":"\u003cstring>","path":"\u003cstring>","subdirectories":[{"name":"\u003cstring>","path":"\u003cstring>"}],"recursive":true}}},"exampleType":"generated"}},"exampleType":"generated"},"20d3b426-163e-43cf-bd88-89039a103879":{"description":"File or directory not found","content":{"application/json":{"schema":{"properties":{"error":{"example":"Error message","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"example":"FILE_ALREADY_EXISTS","type":"string","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Error message","code":"FILE_ALREADY_EXISTS"}}},"exampleType":"generated"},"application/octet-stream":{"schema":{"properties":{"error":{"example":"Error message","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"example":"FILE_ALREADY_EXISTS","type":"string","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Error message","code":"FILE_ALREADY_EXISTS"}}},"exampleType":"generated"}},"exampleType":"generated"},"1b282ef4-6aab-473a-be05-8106b787406b":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"properties":{"error":{"example":"Error message","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"example":"FILE_ALREADY_EXISTS","type":"string","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Error message","code":"FILE_ALREADY_EXISTS"}}},"exampleType":"generated"},"application/octet-stream":{"schema":{"properties":{"error":{"example":"Error message","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"example":"FILE_ALREADY_EXISTS","type":"string","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Error message","code":"FILE_ALREADY_EXISTS"}}},"exampleType":"generated"}},"exampleType":"generated"},"f43be4d6-86ac-4b0f-9e59-9441d683dc71":{"description":"Internal server error","content":{"application/json":{"schema":{"properties":{"error":{"example":"Error message","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"example":"FILE_ALREADY_EXISTS","type":"string","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Error message","code":"FILE_ALREADY_EXISTS"}}},"exampleType":"generated"},"application/octet-stream":{"schema":{"properties":{"error":{"example":"Error message","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"example":"FILE_ALREADY_EXISTS","type":"string","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Error message","code":"FILE_ALREADY_EXISTS"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"9f71ac97-1771-492d-a678-f6d8dd0273eb":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"ca4390e1-f8de-4e19-891e-60b74edb6c39":{"url":"https://sbx-{sandbox_id}-{workspace_id}.{region}.bl.run","variables":{"sandbox_id":{"default":"unknown"},"workspace_id":{"default":"unknown"},"region":{"default":"unknown"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml"},"subdomain":"blaxel","siteName":"Documentation","title":"Get file or directory information - Documentation","contextualStarterQuestions":[{"_id":"69d94bd1d26302b05e2a95b3","deploymentId":"672e5f6ba9a398341da2aaec","questionText":"How do I list directories?","status":"active","generatedBy":"contextual","path":"api-reference/filesystem/get-file-or-directory-information","createdAt":"2026-04-10T19:13:21.444Z","updatedAt":"2026-04-10T19:13:21.444Z","__v":0},{"_id":"69d94bd1d26302b05e2a95b2","deploymentId":"672e5f6ba9a398341da2aaec","questionText":"What formats can I request?","status":"active","generatedBy":"contextual","path":"api-reference/filesystem/get-file-or-directory-information","createdAt":"2026-04-10T19:13:21.444Z","updatedAt":"2026-04-10T19:13:21.444Z","__v":0},{"_id":"69d94bd1d26302b05e2a95b1","deploymentId":"672e5f6ba9a398341da2aaec","questionText":"How do I get file content?","status":"active","generatedBy":"contextual","path":"api-reference/filesystem/get-file-or-directory-information","createdAt":"2026-04-10T19:13:21.444Z","updatedAt":"2026-04-10T19:13:21.444Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/filesystem/get-file-or-directory-information.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Get content of a file or listing of a directory. Use Accept header to control response format for files.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get file or directory information - Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get content of a file or listing of a directory. Use Accept header to control response format for files.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Blaxel Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://blaxel.mintlify.site/_mintlify/api/og/v2?division=filesystem\u0026amp;title=Get+file+or+directory+information\u0026amp;description=Get+content+of+a+file+or+listing+of+a+directory.+Use+Accept+header+to+control+response+format+for+files.\u0026amp;theme=2ee6a4a0c0526ef8591d7c25\u0026amp;signature=d68716ef37bd7eb4e8970fe3ad84115375c154eaa765af67a3c530c5ea740c22\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get file or directory information - Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get content of a file or listing of a directory. Use Accept header to control response format for files.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://blaxel.mintlify.site/_mintlify/api/og/v2?division=filesystem\u0026amp;title=Get+file+or+directory+information\u0026amp;description=Get+content+of+a+file+or+listing+of+a+directory.+Use+Accept+header+to+control+response+format+for+files.\u0026amp;theme=2ee6a4a0c0526ef8591d7c25\u0026amp;signature=d68716ef37bd7eb4e8970fe3ad84115375c154eaa765af67a3c530c5ea740c22\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/blaxel/uaLoRkh_ONjRStCE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F0652D\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/filesystem/get-file-or-directory-information.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.blaxel.ai/#organization\",\"name\":\"Documentation\",\"url\":\"https://docs.blaxel.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/blaxel/Z-RIT2VoXMT2Aw7L/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Z-RIT2VoXMT2Aw7L\u0026q=85\u0026s=7a7cf1e3c766c77f97f32e5c0d4fd209\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.blaxel.ai#website\",\"name\":\"Documentation\",\"url\":\"https://docs.blaxel.ai\",\"publisher\":{\"@id\":\"https://docs.blaxel.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information#webpage\",\"url\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information\",\"name\":\"Get file or directory information\",\"description\":\"Get content of a file or listing of a directory. Use Accept header to control response format for files.\",\"isPartOf\":{\"@id\":\"https://docs.blaxel.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"filesystem\",\"item\":\"https://docs.blaxel.ai/api-reference/filesystem/search-for-text-content-in-files\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get file or directory information\",\"item\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information#apireference\",\"headline\":\"Get file or directory information\",\"name\":\"Get file or directory information\",\"description\":\"Get content of a file or listing of a directory. Use Accept header to control response format for files.\",\"url\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information\",\"mainEntityOfPage\":{\"@id\":\"https://docs.blaxel.ai/api-reference/filesystem/get-file-or-directory-information#webpage\"},\"publisher\":{\"@id\":\"https://docs.blaxel.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.blaxel.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Documentation","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"calendar","href":"/changelog"},{"anchor":"Blaxel Skills \u0026 MCP","icon":"robot","href":"/skills-mcp"},{"anchor":"Integrations directory","icon":"puzzle-piece","href":"https://blaxel.ai/integrations"},{"anchor":"Community","icon":"discord","href":"/Community"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/Overview"}]},{"tab":"Tutorials and Examples","pages":[{"title":"Tutorials and Examples","href":"/Tutorials/Overview"}]},{"tab":"Platform APIs Reference","pages":[{"title":"Platform APIs Reference","href":"/api-reference/introduction"}]},{"tab":"Sandbox API Reference","groups":[{"group":"archive","pages":[{"title":"Export the filesystem changes to a presigned URL","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /archive/export","href":"/api-reference/archive/export-the-filesystem-changes-to-a-presigned-url"},{"title":"Lift the archive freeze","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /archive/resume","href":"/api-reference/archive/lift-the-archive-freeze"},{"title":"Get the archive status","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /archive/status","href":"/api-reference/archive/get-the-archive-status"}]},{"group":"fastapply","pages":[{"title":"Apply code edit","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml put /codegen/fastapply/{path}","href":"/api-reference/fastapply/apply-code-edit"}]},{"group":"codegen","pages":[{"title":"Code reranking/semantic search","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /codegen/reranking/{path}","href":"/api-reference/codegen/code-rerankingsemantic-search"}]},{"group":"drive","pages":[{"title":"List currently mounted drives","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /drives/mount","href":"/api-reference/drive/list-currently-mounted-drives"},{"title":"Attach a drive to a local path","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /drives/mount","href":"/api-reference/drive/attach-a-drive-to-a-local-path"},{"title":"Detach a drive from a local path","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /drives/mount/{mountPath}","href":"/api-reference/drive/detach-a-drive-from-a-local-path"}]},{"group":"system","pages":[{"title":"Reload environment from guest metadata","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /environment/reload","href":"/api-reference/system/reload-environment-from-guest-metadata"},{"title":"Health check","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /health","href":"/api-reference/system/health-check"},{"title":"Upgrade the sandbox-api","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /upgrade","href":"/api-reference/system/upgrade-the-sandbox-api"}]},{"group":"filesystem","pages":[{"title":"Search for text content in files","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem-content-search/{path}","href":"/api-reference/filesystem/search-for-text-content-in-files"},{"title":"Copy a file or directory","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /filesystem-copy","href":"/api-reference/filesystem/copy-a-file-or-directory"},{"title":"Find files and directories","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem-find/{path}","href":"/api-reference/filesystem/find-files-and-directories"},{"title":"List multipart uploads","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem-multipart","href":"/api-reference/filesystem/list-multipart-uploads"},{"title":"Abort multipart upload","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /filesystem-multipart/{uploadId}/abort","href":"/api-reference/filesystem/abort-multipart-upload"},{"title":"Complete multipart upload","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /filesystem-multipart/{uploadId}/complete","href":"/api-reference/filesystem/complete-multipart-upload"},{"title":"Upload part","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml put /filesystem-multipart/{uploadId}/part","href":"/api-reference/filesystem/upload-part"},{"title":"List parts","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem-multipart/{uploadId}/parts","href":"/api-reference/filesystem/list-parts"},{"title":"Initiate multipart upload","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /filesystem-multipart/initiate/{path}","href":"/api-reference/filesystem/initiate-multipart-upload"},{"title":"Fuzzy search for files and directories","description":"Ranks the files and directories under a path by how well their relative path fuzzy-matches `query` (fzf algorithm: the query's characters must appear in order, not necessarily next to each other), best match first.\nFuzzy search is for \"jump to file\" lookups from a partial name. The `patterns` parameter is currently ignored by this endpoint; use find for exact glob filtering.","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem-search/{path}","href":"/api-reference/filesystem/fuzzy-search-for-files-and-directories"},{"title":"Get file or directory information","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem/{path}","href":"/api-reference/filesystem/get-file-or-directory-information"},{"title":"Create or update a file or directory","description":"Create or update a file or directory.\n\nIdempotent: an existing file is overwritten (truncated, not appended to) and an existing directory is kept, so retrying the same request is safe.\n\nSend either a JSON body (FileRequest) or `multipart/form-data` for binary files. Multipart fields, in any order: `file` (required, the file content), `permissions` (optional octal mode such as `0755`, applied when the file is created, default `0644`; an existing file keeps its mode), `path` (optional, ignored: the target is always the URL path).","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml put /filesystem/{path}","href":"/api-reference/filesystem/create-or-update-a-file-or-directory"},{"title":"Delete file or directory","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /filesystem/{path}","href":"/api-reference/filesystem/delete-file-or-directory"},{"title":"Stat a file or directory","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml head /filesystem/{path}","href":"/api-reference/filesystem/stat-a-file-or-directory"},{"title":"Get directory tree","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /filesystem/tree/{path}","href":"/api-reference/filesystem/get-directory-tree"},{"title":"Create or update directory tree","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml put /filesystem/tree/{path}","href":"/api-reference/filesystem/create-or-update-directory-tree"},{"title":"Delete directory tree","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /filesystem/tree/{path}","href":"/api-reference/filesystem/delete-directory-tree"},{"title":"Stream file modification events in a directory","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /watch/filesystem/{path}","href":"/api-reference/filesystem/stream-file-modification-events-in-a-directory"}]},{"group":"network","pages":[{"title":"Start monitoring ports for a process","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /network/process/{pid}/monitor","href":"/api-reference/network/start-monitoring-ports-for-a-process"},{"title":"Stop monitoring ports for a process","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /network/process/{pid}/monitor","href":"/api-reference/network/stop-monitoring-ports-for-a-process"},{"title":"Get open ports for a process","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /network/process/{pid}/ports","href":"/api-reference/network/get-open-ports-for-a-process"},{"title":"Disconnect tunnel","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /network/tunnel","href":"/api-reference/network/disconnect-tunnel"},{"title":"Update tunnel configuration","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml put /network/tunnel/config","href":"/api-reference/network/update-tunnel-configuration"}]},{"group":"process","pages":[{"title":"List all processes","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /process","href":"/api-reference/process/list-all-processes"},{"title":"Execute a command","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /process","href":"/api-reference/process/execute-a-command"},{"title":"Get process by identifier","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /process/{identifier}","href":"/api-reference/process/get-process-by-identifier"},{"title":"Stop a process","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /process/{identifier}","href":"/api-reference/process/stop-a-process"},{"title":"Kill a process","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /process/{identifier}/kill","href":"/api-reference/process/kill-a-process"},{"title":"Get process logs","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /process/{identifier}/logs","href":"/api-reference/process/get-process-logs"},{"title":"Stream process logs in real time","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /process/{identifier}/logs/stream","href":"/api-reference/process/stream-process-logs-in-real-time"},{"title":"Write to a process's stdin","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml post /process/{identifier}/stdin","href":"/api-reference/process/write-to-a-processs-stdin"},{"title":"Close a process's stdin","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml delete /process/{identifier}/stdin","href":"/api-reference/process/close-a-processs-stdin"},{"title":"Wait for a process to finish","deprecated":null,"version":null,"openapi":"https://raw.githubusercontent.com/blaxel-ai/sandbox/refs/heads/main/sandbox-api/docs/openapi.yml get /process/{identifier}/wait","href":"/api-reference/process/wait-for-a-process-to-finish"}]}]},{"tab":"SDK Reference","pages":[{"title":"SDK Reference","href":"/sdk-reference/introduction"}]},{"tab":"CLI Reference","pages":[{"title":"CLI Reference","href":"/cli-reference/introduction"}]},{"tab":"Deployment Reference","pages":[{"title":"Deployment Reference","href":"/deployment-reference"}]}]},"basePath":"","title":"Get file or directory information - Documentation","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-Cj6eAYhz.js","dist-CdrJecqK.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-D-TRO5q5.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-5FCzAcfS.js","utils-SLtAG4EZ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-2DZi8ZMu.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D7J3nkzE.js","snippetPresets-D0Alv0AH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BI4qNJ2c.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BD3uyr8j.js","shallow-D8iEBr5z.js","getApiPlaygroundDisplay-CgNP4lzR.js","CodeSnippet-CX-QHuMs.js","CodeSnippets-VlXE-ZUf.js","Page-D9ithiIZ.js","getPastedJson-DYNQkZ1M.js","icon-CzacdwOi.js","MethodPill-2JVqoYKi.js","DuplicateIcon-_xVXs-U8.js","createIcon-BRHrweLo.js","DynamicMarkdown-mQG_iQiE.js","SectionHeading-DMpJzv8f.js","axios-vUo_bRtp.js","Markdown-5FGIym-8.js","AssistantPageLink-CHlcWBLM.js"]}