import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.fs.listFiles('id', { path: '/J!' });
console.log(response);[
{
"name": "<string>",
"path": "<string>",
"size_bytes": 123,
"is_dir": true,
"mod_time": "2023-11-07T05:31:56Z",
"mode": "<string>"
}
]import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.fs.listFiles('id', { path: '/J!' });
console.log(response);[
{
"name": "<string>",
"path": "<string>",
"size_bytes": 123,
"is_dir": true,
"mod_time": "2023-11-07T05:31:56Z",
"mode": "<string>"
}
]Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Browser session ID
Absolute directory path.
^/.*Directory listing
Base name of the file or directory.
Absolute path.
Size in bytes. 0 for directories.
Whether the path is a directory.
Last modification time.
File mode bits (e.g., "drwxr-xr-x" or "-rw-r--r--").