fix(io): remove duplicate method declarations
Clean up the client.go file that had duplicate method declarations from a bad cherry-pick merge. Now has 127 lines of simple, clean code. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
392d3a23ac
commit
96a4241ca4
1 changed files with 0 additions and 32 deletions
|
|
@ -125,35 +125,3 @@ func (m *Medium) FileGet(p string) (string, error) {
|
|||
func (m *Medium) FileSet(p, content string) error {
|
||||
return m.Write(p, content)
|
||||
}
|
||||
|
||||
// Stat returns file information for the given path.
|
||||
func (m *Medium) Stat(relativePath string) (fs.FileInfo, error) {
|
||||
fullPath, err := m.path(relativePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return os.Stat(fullPath)
|
||||
}
|
||||
|
||||
// Exists checks if a path exists (file or directory).
|
||||
func (m *Medium) Exists(relativePath string) bool {
|
||||
fullPath, err := m.path(relativePath)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
_, err = os.Stat(fullPath)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// IsDir checks if a path exists and is a directory.
|
||||
func (m *Medium) IsDir(relativePath string) bool {
|
||||
fullPath, err := m.path(relativePath)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
info, err := os.Stat(fullPath)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return info.IsDir()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue