WriteFile is equivalent to os.WriteFile, except that it uses the root path and the given relative path.
(relativePath string, data []byte, perm os.FileMode)
| 69 | |
| 70 | // WriteFile is equivalent to os.WriteFile, except that it uses the root path and the given relative path. |
| 71 | func (root RootFolderLocation) WriteFile(relativePath string, data []byte, perm os.FileMode) error { |
| 72 | return os.WriteFile(filepath.ToSlash(filepath.Join(root.path, relativePath)), data, perm) |
| 73 | } |
| 74 | |
| 75 | // WriteFileToDirectory is similar to WriteFile, except that it takes in a relative path for the directory containing |
| 76 | // the file, along with the file name to be written. This is purely for convenience, as the same behavior can be |
no outgoing calls