mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-25 05:37:37 +03:00
more work on rebasing including visual indicators
This commit is contained in:
@@ -202,3 +202,14 @@ func (c *OSCommand) CreateTempFile(filename, content string) (string, error) {
|
||||
func (c *OSCommand) RemoveFile(filename string) error {
|
||||
return os.Remove(filename)
|
||||
}
|
||||
|
||||
// FileExists checks whether a file exists at the specified path
|
||||
func (c *OSCommand) FileExists(path string) (bool, error) {
|
||||
if _, err := os.Stat(path); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user