Skip to main content
GET
/
browsers
/
{id}
/
fs
/
file_info
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: 'My API Key',
});

const response = await client.browsers.fs.fileInfo('id', { path: '/J!' });

console.log(response.is_dir);
{
  "name": "<string>",
  "path": "<string>",
  "size_bytes": 123,
  "is_dir": true,
  "mod_time": "2023-11-07T05:31:56Z",
  "mode": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Browser session ID

Query Parameters

path
string
required

Absolute path of the file or directory.

Response

File information

name
string
required

Base name of the file or directory.

path
string
required

Absolute path.

size_bytes
integer
required

Size in bytes. 0 for directories.

is_dir
boolean
required

Whether the path is a directory.

mod_time
string<date-time>
required

Last modification time.

mode
string
required

File mode bits (e.g., "drwxr-xr-x" or "-rw-r--r--").

I