- Add ChunkedBuffer for 64KB chunked file access with dirty-chunk eviction protection - Add LineIndex for precise byte-offset-to-line-number mapping - Refactor IO task system with context cancellation, typed priorities, and new task types (ReadChunk, BuildLineIndex, StatFile) - Add ReadFileAt to FileSystem interface (mock + real implementations) - Integrate virtual scrolling into editor layout - Add comprehensive tests for chunked buffer eviction, dirty-chunk safety, and full edit lifecycle
18 lines
535 B
Go
18 lines
535 B
Go
package pool
|
|
|
|
import "pad/internal/io/pool/types"
|
|
|
|
// FileSystem defines the interface for filesystem operations
|
|
// used by the worker pool.
|
|
type FileSystem interface {
|
|
ReadDir(path string) ([]types.DirEntry, error)
|
|
DirExists(path string) bool
|
|
FileExists(path string) bool
|
|
ReadFile(path string) ([]byte, error)
|
|
ReadFileAt(path string, offset, size int) ([]byte, error)
|
|
WriteFile(path string, content []byte) error
|
|
WriteFileAtomic(path string, content []byte) error
|
|
DeleteFile(path string) error
|
|
CreateDir(path string) error
|
|
}
|