github.com/metux/go-metabuild@v0.0.0-20240118143255-d9ed5ab697f9/util/fileutil/fmode.go (about)

     1  package fileutil
     2  
     3  import (
     4  	"os"
     5  	"strconv"
     6  )
     7  
     8  // FIXME: should also parse textual representation
     9  func FileModeParse(s string) (os.FileMode, error) {
    10  	n, err := strconv.ParseUint(s, 8, 32)
    11  	return os.FileMode(n), err
    12  }