Lines Matching refs:sourcePath
129 func (f FileCopier) GetDestPath(codebaseDir, sourcePath, workspaceDir string) (string, error) {
130 if !strings.HasPrefix(sourcePath+"/", codebaseDir+"/") {
131 return "", fmt.Errorf("%s is not contained in %s", sourcePath, codebaseDir)
133 relPath, err := filepath.Rel(codebaseDir, sourcePath)
143 func (f FileCopier) CopyNode(sourceInfo os.FileInfo, codebaseDir, sourcePath, workspaceDir string) …
144 destPath, err := f.GetDestPath(codebaseDir, sourcePath, workspaceDir)
150 return f.CopySymlink(sourcePath, destPath)
154 return f.CopyFile(sourceInfo, sourcePath, destPath)
158 func (f FileCopier) CopySymlink(sourcePath string, destPath string) error {
165 target, err := os.Readlink(sourcePath)
188 func (f FileCopier) CopyFile(sourceInfo os.FileInfo, sourcePath, destPath string) error {
195 sourceFile, err := os.Open(sourcePath)
214 func (f FileCopier) CopyDirRecursive(sourceInfo os.FileInfo, sourcePath, destPath string) error {
218 childNodes, err := ioutil.ReadDir(sourcePath)
223 childSourcePath := filepath.Join(sourcePath, childInfo.Name())