Versions in this module Expand all Collapse all v0 v0.5.0 Nov 12, 2024 v0.4.1 Oct 7, 2024 Changes in this version + type FileAlreadyExistsError struct + func NewFileAlreadyExistsError(path string) *FileAlreadyExistsError + func (e FileAlreadyExistsError) Error() string + type FileManager interface + ApplyPatch func(ctx context.Context, fs afero.Fs, path, patch string) (*model.File, error) + CreateFile func(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error) + DeleteFile func(ctx context.Context, fs afero.Fs, path string) error + ListFiles func(ctx context.Context, fs afero.Fs, opts ...ListFileOption) ([]*model.File, error) + ReadFile func(ctx context.Context, fs afero.Fs, path string) (*model.File, error) + UpdateFile func(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error) + UpdateLines func(ctx context.Context, fs afero.Fs, path string, lineDiff LineDiffChunk) (*model.File, error) + func NewFileManager(factory gitignore.MatcherFactory) FileManager + type FileManagerImpl struct + func (fm *FileManagerImpl) ApplyPatch(ctx context.Context, fs afero.Fs, path, patch string) (*model.File, error) + func (fm *FileManagerImpl) CreateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error) + func (fm *FileManagerImpl) DeleteFile(ctx context.Context, fs afero.Fs, path string) error + func (fm *FileManagerImpl) ListFiles(ctx context.Context, fs afero.Fs, opts ...ListFileOption) ([]*model.File, error) + func (fm *FileManagerImpl) ReadFile(ctx context.Context, fs afero.Fs, path string) (*model.File, error) + func (fm *FileManagerImpl) UpdateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error) + func (fm *FileManagerImpl) UpdateLines(ctx context.Context, fs afero.Fs, path string, lineDiff LineDiffChunk) (*model.File, error) + type FileNotFoundError struct + func NewFileNotFoundError(path string) *FileNotFoundError + func (e FileNotFoundError) Error() string + type LineDiffChunk struct + Content string + EndLine int + StartLine int + type ListFileOption func(opts *ListFilesOptions) + func ListFilesWithContent() ListFileOption + func ListFilesWithFilter(filter PatternFilter) ListFileOption + func ListFilesWithShowHidden() ListFileOption + type ListFilesOptions struct + Filter PatternFilter + ShowHidden bool + WithContent bool + type PatternFilter struct + Exclude []string + Include []string