Move the files in this directory to the new directory.
497424
public String addFile(File file, String strFileList)
    {
        String strName = file.getName();
        int iJava = strName.indexOf(".java");
        if (iJava != -1) if (iJava == strName.length() - 5)
        {
            String strParent = file.getParent();
            String strPath = file.getPath();
            strFileList += strPath + "/" + strParent;
        }
        return strFileList;
    }
207909
def update(self):
        

        self._copyfiles = False
        self._updatefiles = True
        self._purge = False
        self._creatdirs = False

        if self._verbose:
            self.log('Updating directory %s with %s\n' %
                     (self._dir2, self._dir1))
        self._dirdiffandupdate(self._dir1, self._dir2)
848218
def mk_dir(self) :
        """"""
        if not os.path.exists(self.abs) :
            os.makedirs(self.abs)
1157078
def move_images(self, image_directory):
        

        image_paths = glob(image_directory + "/**/*.png", recursive=True)
        for image_path in image_paths:
            destination = image_path.replace("\\image\\", "\\")
            shutil.move(image_path, destination)
        image_folders = glob(image_directory + "/**/image", recursive=True)
        for image_folder in image_folders:
            os.removedirs(image_folder)
318758
private void addFilesFromDir(File dir) {
    File[] files = dir.listFiles();
    for (int i = 0; i < files.length; i++) {
      if (!files[i].isDirectory()) {
        mFiles.add(files[i]);
      } else if (mRecursive) {
        addFilesFromDir(files[i]);
      }
    }
  }
984160
private void moveFromTempToPerm() throws IOException {
    try {
      FileStatus[] fileStatus =
          localFs.listStatus(temp, LuceneIndexFileNameFilter.getFilter());
      Path segmentsPath = null;
      Path segmentsGenPath = null;

      // move the files created in temp dir except segments_N and segments.gen
      for (int i = 0; i < fileStatus.length; i++) {
        Path path = fileStatus[i].getPath();
        String name = path.getName();

        if (LuceneUtil.isSegmentsGenFile(name)) {
          assert (segmentsGenPath == null);
          segmentsGenPath = path;
        } else if (LuceneUtil.isSegmentsFile(name)) {
          assert (segmentsPath == null);
          segmentsPath = path;
        } else {
          fs.completeLocalOutput(new Path(perm, name), path);
        }
      }

      // move the segments_N file
      if (segmentsPath != null) {
        fs.completeLocalOutput(new Path(perm, segmentsPath.getName()),
            segmentsPath);
      }

      // move the segments.gen file
      if (segmentsGenPath != null) {
        fs.completeLocalOutput(new Path(perm, segmentsGenPath.getName()),
            segmentsGenPath);
      }
    } finally {
      // finally delete the temp dir (files should have been deleted)
      localFs.delete(temp);
    }
  }
1050920
def move(srcpath, dstpath, overwrite=True):
    """"""
    # TODO: (JRR@201612230924) Consider adding smarter checks to prevent files ending up with directory names; e.g. if dstpath directory does not exist.
    if not op.exists(srcpath):
        return False
    if srcpath == dstpath:
        return True
    if op.isfile(srcpath) and op.isdir(dstpath):
        verfunc = op.isfile
        verpath = op.join(dstpath, op.basename(srcpath))
    elif op.isfile(srcpath):
        verfunc = op.isfile
        verpath = dstpath
        makedirs(dstpath)
    elif op.isdir(srcpath) and op.isdir(dstpath):
        verfunc = op.isdir
        verpath = op.join(dstpath, op.basename(srcpath))
    elif op.isdir(srcpath):
        verfunc = op.isdir
        verpath = dstpath
    else:
        return False
    if op.isfile(verpath):
        if not overwrite:
            return False
        else:
            # On Windows, filename case is ignored so the following check will
            # prevent unintentionally deleting the srcpath before moving.
            if "nt" == os.name and srcpath.lower() == dstpath.lower():
                pass
            elif not delete(verpath):
                return False
    try:
        shutil.move(srcpath, dstpath)
    except:
        return False
    return verfunc(verpath)
1132409
def push(self, dir):
        
        self.stack.append(os.getcwd())
        os.chdir(dir or os.getcwd())
1315214
private function moveFiles()
    {
        // Ensure we have the file permissions not in cache as new files were installed.
        clearstatcache();
        // Now move all the files over.
        $destinationDir = $this->file->get(self::SETTING_DESTINATION_DIR);
        $ioHandler      = $this->getIO();
        $logging        = $ioHandler->isVeryVerbose();
        $this->folders  = [];
        foreach (Finder::create()->in($this->tempDir)->ignoreDotFiles(false)->ignoreVCS(false) as $file) {
            $this->moveFile($file, $destinationDir, $logging, $ioHandler);
        }

        foreach (array_reverse($this->folders) as $folder) {
            if ($logging) {
                $ioHandler->write(sprintf('remove directory %s', $folder));
            }
            rmdir($folder);
        }
    }
848501
def move(self, path, raise_if_exists=False):
        
        self.rename(path, raise_if_exists=raise_if_exists)
1312904
public function newDirectory()
    {
        $target_full_path = $this->getTargetFile()->getFilepath(true);
        $this->event(YouweFileManagerEvents::BEFORE_FILE_DIR_CREATED);
        $this->getDriver()->makeDir($target_full_path);
        $this->getCurrentFile()->updateFilepath($target_full_path);
        $this->event(YouweFileManagerEvents::AFTER_FILE_DIR_CREATED);
    }
41293
private void moveDownloadedPlugins() {
    if (fs.getDownloadedPluginsDir().exists()) {
      for (File sourceFile : listJarFiles(fs.getDownloadedPluginsDir())) {
        overrideAndRegisterPlugin(sourceFile);
      }
    }
  }
1326999
public void moveThisFile(File fileSource, File fileDestDir, String strDestName)
    {
        try   {
            fileDestDir.mkdirs();
            FileInputStream fileIn = new FileInputStream(fileSource);
            InputStreamReader inStream = new InputStreamReader(fileIn);
            StreamSource source = new StreamSource(inStream);
        
            System.out.println(fileDestDir + " " + strDestName);
            File fileDest = new File(fileDestDir, strDestName);
            fileDest.createNewFile();
            FileOutputStream fileOut = new FileOutputStream(fileDest);
            PrintWriter dataOut = new PrintWriter(fileOut);
            StreamResult dest = new StreamResult(dataOut);
        
            m_transformer.transform(source, dest);
            
            dataOut.close();
            fileOut.close();
        
            inStream.close();
            fileIn.close();
        } catch (TransformerException ex)  {
            ex.printStackTrace();
        } catch (FileNotFoundException ex)  {
            ex.printStackTrace();
        } catch (IOException ex)    {
            ex.printStackTrace();
        }
    }
490633
def fs_move(from, to)
      FileUtils.mv(File.join(self.git_dir, from), File.join(self.git_dir, to))
    end
360200
def do_mkdir(self, path):
        """"""
        path = path[0]

        self.n.makeDirectory(self.current_path + path)
        self.dirs = self.dir_complete()
330012
def move(self, source_path, destination_path):
        
        self.copy(source_path, destination_path)
        self.remove(source_path)
1156124
private void moveTaskOutputs(TaskAttemptContext context,
                               FileSystem fs,
                               Path jobOutputDir,
                               Path taskOutput) 
  throws IOException {
    TaskAttemptID attemptId = context.getTaskAttemptID();
    context.progress();
    if (fs.isFile(taskOutput)) {
      Path finalOutputPath = getFinalPath(jobOutputDir, taskOutput, 
                                          workPath);
      if (!fs.rename(taskOutput, finalOutputPath)) {
        if (!fs.delete(finalOutputPath, true)) {
          throw new IOException("Failed to delete earlier output of task: " + 
                                 attemptId);
        }
        if (!fs.rename(taskOutput, finalOutputPath)) {
          throw new IOException("Failed to save output of task: " + 
        		  attemptId);
        }
      }
      LOG.debug("Moved " + taskOutput + " to " + finalOutputPath);
    } else if(fs.getFileStatus(taskOutput).isDir()) {
      FileStatus[] paths = fs.listStatus(taskOutput);
      Path finalOutputPath = getFinalPath(jobOutputDir, taskOutput, workPath);
      fs.mkdirs(finalOutputPath);
      if (paths != null) {
        for (FileStatus path : paths) {
          moveTaskOutputs(context, fs, jobOutputDir, path.getPath());
        }
      }
    }
  }