From src-tauri/src/main.rs, here are all the Tauri commands that need HTTP API equivalents:
list_files(path, window, state)- List files in directoryfiles_list_for_miller_col(path, window, state)- List files for Miller columnscheckiffile(path)- Check if path exists and is filedoespathexist(path)- Check if path existsopenpath(path)- Open file/URL with default applicationfoldersize(path, window, state)- Get folder sizegetparentpath(path, window, state)- Get parent directory pathget_path_options(path, window, state)- Get path completion options
newtab(path, window, state)- Create new tabnewwindow(path, ff, window, state)- Create new windownewspecwindow(winlabel, name, window, state)- Create specific windowclosetab(windowname, window, state)- Close tabclosealltabs(window, state)- Close all tabslisttabs(window, state)- List all tabstabname(path)- Get tab name from pathdisablenav(windowname, window, state)- Disable navigationaddtotabhistory(path, window, state)- Add to tab history
searchload(path, window, state)- Load search resultsloadsearchlist(windowname, id, path, window, state)- Load search listpopulate_try(path, window, state)- Populate directory (used by search)search_try(path, window, state)- Search functionality
fileop(src, dest, window, state)- File operations (copy/move/delete)checkforconflicts(src, dest, window, state)- Check for file conflicts
addmark(path, window, state)- Add bookmarkremovemark(path, window, state)- Remove bookmarkloadmarks(windowname, app_handle, marks_json)- Load bookmarks
configfolpath(window, state)- Get folder configurationnosize(windowname, togglewhat, window, state)- Toggle various optionsstartup(window)- Startup initialization
getlocalip()- Get local IP addressget_timestamp()- Get current timestampchecker()- Check for updateshighlightfile(path, theme)- Highlight file syntaxfilegptendpoint(endpoint)- Get/set FileGPT endpoint
otb(bname, path, state)- Open terminal/button custom scriptmirror(functionname, arguments, window)- Mirror function to frontend
senddriveslist(window)- Send list of drivesmountdrive(drive_letter)- Mount driveunmountdrive(drive_letter)- Unmount drive
navbrowsetimeline(direction, window, state)- Browse navigation history
loadfromhtml(path, window, state)- Load from HTMLloadmarkdown(path, window, state)- Load markdown
startserver(window)- Start serverstopserver(window)- Stop server
- Development:
http://localhost:8477(matches existing TCP server) - Production: Configurable via environment variable
- All endpoints accept POST requests with JSON body
- Authentication: Bearer token (placeholder for future implementation)
- CORS: Enabled for all origins during development
{
"success": true,
"data": {},
"error": null
}// List files in directory
POST /api/files/list
{
"path": "/home/user/documents"
}
// Get file info
POST /api/files/info
{
"path": "/home/user/documents/file.txt"
}
// Open file
POST /api/files/open
{
"path": "/home/user/documents/file.txt"
}
// Get folder size
POST /api/files/folder-size
{
"path": "/home/user/documents"
}
// Get parent path
POST /api/files/parent-path
{
"path": "/home/user/documents/subfolder"
}
// Path completion
POST /api/files/path-options
{
"path": "/home/user/doc"
}// Create new tab
POST /api/tabs/new
{
"path": "/home/user/documents"
}
// Close tab
POST /api/tabs/close
{
"tab_id": "unique-tab-id"
}
// List tabs
POST /api/tabs/list
// Get tab name
POST /api/tabs/name
{
"path": "/home/user/documents"
}// Search directory
POST /api/search/load
{
"path": "/home/user",
"query": "document"
}
// Load search results
POST /api/search/results
{
"window_name": "main",
"id": "search-1",
"path": "/home/user"
}// Get configuration
POST /api/config/folder-path
// Toggle options
POST /api/config/toggle
{
"window_name": "main",
"option": "size" // size, excludehidden, includefolder, folcount, sessionsave
}// Get local IP
POST /api/system/local-ip
// Get timestamp
POST /api/system/timestamp
// Check for updates
POST /api/system/check-updates
// Highlight file
POST /api/files/highlight
{
"path": "/home/user/code.rs",
"theme": "dark"
}// Execute custom script
POST /api/scripts/execute
{
"button_name": "Open Terminal",
"path": "/home/user/documents"
}For real-time updates, implement WebSocket endpoints:
/api/ws/events- Listen to application events/api/ws/progress- Progress updates for long operations
{
"success": false,
"error": {
"code": "FILE_NOT_FOUND",
"message": "The specified file does not exist"
}
}- Implement basic rate limiting (100 requests per minute)
- Include X-RateLimit-* headers in responses