ReadFile is equivalent to os.ReadFile, except that it uses the root path and the given relative path.
(relativePath string)
| 57 | |
| 58 | // ReadFile is equivalent to os.ReadFile, except that it uses the root path and the given relative path. |
| 59 | func (root RootFolderLocation) ReadFile(relativePath string) ([]byte, error) { |
| 60 | return os.ReadFile(filepath.ToSlash(filepath.Join(root.path, relativePath))) |
| 61 | } |
| 62 | |
| 63 | // ReadFileFromDirectory is similar to ReadFile, except that it takes in a relative path for the directory containing |
| 64 | // the file, along with the file name to be read. This is purely for convenience, as the same behavior can be |
no outgoing calls