clod
Copyright(c) Fuzz Leonard 2025
LicenseMIT
Maintainercyborg@bionicfuzz.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Clod.FileSystem.Transformations

Description

This module handles special file type transformations required for Claude AI compatibility. It contains transformations like SVG to XML conversion that are required due to external constraints from Claude's Project Knowledge system, as well as path flattening and sanitization functions for improved compatibility.

Note: These transformations exist solely due to limitations in Claude's file format support and may be removed in future versions if those limitations are lifted.

Synopsis

Documentation

flattenPath :: FilePath -> FilePath Source #

Flatten a path by removing directory separators and replacing them This makes paths suitable for flat storage

sanitizeFilename :: FilePath -> FilePath Source #

Sanitize a filename by removing special characters This ensures filenames are valid across platforms

transformFileContent Source #

Arguments

:: FileReadCap 
-> FileWriteCap 
-> (ByteString -> Text)

Transformation function

-> FilePath 
-> FilePath 
-> ClodM () 

Transform file content for Claude compatibility This function is used for special file types that need transformation