github.com/cockroachdb/tools@v0.0.0-20230222021103-a6d27438930d/internal/robustio/robustio_other.go (about)

     1  // Copyright 2019 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !windows && !darwin
     6  // +build !windows,!darwin
     7  
     8  package robustio
     9  
    10  import (
    11  	"io/ioutil"
    12  	"os"
    13  )
    14  
    15  func rename(oldpath, newpath string) error {
    16  	return os.Rename(oldpath, newpath)
    17  }
    18  
    19  func readFile(filename string) ([]byte, error) {
    20  	return ioutil.ReadFile(filename)
    21  }
    22  
    23  func removeAll(path string) error {
    24  	return os.RemoveAll(path)
    25  }
    26  
    27  func isEphemeralError(err error) bool {
    28  	return false
    29  }