Documentation
¶
Index ¶
- Constants
- func EnsureUTF8(data []byte) ([]byte, error)
- func FileExists(path string) bool
- func GetFileMIMEType(path string) string
- func IsLikelyTextFile(path string) bool
- func LogDebug(debug bool, format string, v ...interface{})
- func ReadFileContents(path string) ([]byte, error)
- type ResourceManager
Constants ¶
View Source
const FileURIPrefix = "file://"
URI prefix for file resources
Variables ¶
This section is empty.
Functions ¶
func EnsureUTF8 ¶ added in v0.0.2
EnsureUTF8 converts text to UTF-8 encoding
func FileExists ¶ added in v0.0.2
FileExists checks if a file exists and is accessible
func GetFileMIMEType ¶ added in v0.0.2
GetFileMIMEType returns the MIME type for a file
func IsLikelyTextFile ¶ added in v0.0.2
IsLikelyTextFile checks if a file is likely to be a text file
func ReadFileContents ¶ added in v0.0.2
ReadFileContents reads and returns the contents of a file handling encoding conversion to UTF-8
Types ¶
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
ResourceManager manages file resources for the MCP server
func NewResourceManager ¶
func NewResourceManager(workspacePath string, debug bool) *ResourceManager
NewResourceManager creates a new resource manager
func (*ResourceManager) GetFileURI ¶
func (rm *ResourceManager) GetFileURI(path string) string
GetFileURI returns the URI for a file path
func (*ResourceManager) GetResourceIDFromPath ¶
func (rm *ResourceManager) GetResourceIDFromPath(path string) string
GetResourceIDFromPath returns a resource ID from a file path
Click to show internal directories.
Click to hide internal directories.