Moves a file. {'_file_move': {'dest': 'new_file_name'}}

        Args:
            filename (str): Filename.
            settings (dict): Must be {"dest": path of new file}
330097
def file_move(filename, settings):
        
        if len(settings) != 1:
            raise ValueError("Settings must only contain one item with key "
                             "'dest'.")
        for k, v in settings.items():
            if k == "dest":
                shutil.move(filename, v)
260331
function addFile(filename) {
        if (ignoredPaths.contains(filename)) {
            return;
        }
        filename = fs.realpathSync(filename);
        if (added[filename]) {
            return;
        }
        files.push(filename);
        added[filename] = true;
    }
1117810
def move(self, path, destination):
        
        args = {
            'path': path,
            'destination': destination,
        }

        return self._client.json('filesystem.move', args)
366591
def move(fname, folder, options):
    
    if os.path.isfile(fname):
        shutil.move(fname, folder)
    else:
        if options.silent is False:
            print('{0} missing'.format(fname))
1209622
def save(self, filename, verbose=False):
        
        with open(filename, 'w') as fid:
            json.dump(self._conf, fid, indent=4)
        if verbose:
            print('Saved settings in ' + filename)
786070
static void move(File src, File dest) throws IOException {
        try {
            Files.move(src.toPath(), dest.toPath());
        } catch (IOException x) {
            throw x;
        } catch (Exception x) {
            throw new IOException(x);
        }
    }
87759
def saveSettings(self, settings):
        
        value = wrapVariant(os.path.pathsep.join(self.filenames()))
        settings.setValue('recent_files', value)
358784
def populate(self, filename):
        

        if os.path.isfile(filename):
            fid_st = os.stat(filename)
            self.name = os.path.abspath(filename)
            self.full_name = filename
            self.size = fid_st.st_size
            self.last_modified = fid_st.st_mtime
            self.last_accessed = fid_st.st_atime
            self.last_info_changed = fid_st.st_ctime
            self.location = os.path.dirname(filename)
467064
def do_action(self, target, dry_run=False):
        
        # Get full path to the file in the destination directory
        new_filename = os.path.join(self.destination, os.path.basename(target))

        # If the file exists in the destination directory, append _NNN to the name where NNN is
        # a zero padded number. Starts at _001
        while os.path.exists(new_filename):
            # if filename ends in _NNN, start at that number
            filename, extension = os.path.splitext(os.path.basename(new_filename))
            if filename[-4] == '_' and filename[-3:].isdigit():
                # Split the number off the filename and increment it, handle suffixes longer than 3 numbers
                current = filename.split('_')[-1]
                filename_root = filename[0:-len(current)-1]
                current = int(current) + 1
                new_filename = os.path.join(self.destination,
                                            (filename_root +
                                             "_{0:03d}".format(current) +
                                             extension))
            else:
                # No number suffix found in the filename, just start at _001
                new_filename = os.path.join(self.destination,
                                            (filename + "_001" + extension))

        if dry_run is False:
            self.logger.debug("Moving {0} to {1}".format(target, new_filename))

            if not os.path.exists(new_filename):
                try:
                    shutil.move(target, new_filename)
                except IOError:
                    self.logger.error("Error moving file {0} to {1}".format(target, self.destination))
                    raise IOError
            else:
                self.logger.error("Destination file already exists: {0}".format(new_filename))
                raise IOError

            return new_filename

        else:
            self.logger.debug("Dry run. Skipping move {0} to {1}".format(target, new_filename))
            return target
959702
public static void copyFile(String fileName, String newFileName, boolean overwriteExisting) throws IOException {
		copyFile(new File(fileName), newFileName, overwriteExisting);
	}
1075440
public static void moveFile(@NotNull Path from, @NotNull Path to) throws IOException {
		Validate.isTrue(isFileExists(from), "%s is not exist or not a file", from);
		Validate.notNull(to);
		Validate.isTrue(!isDirExists(to), "%s is  exist but it is a dir", to);

		Files.move(from, to);
	}
986342
def save_settings(self, filename):
        '''
        '''

        data = dict()
        data['valueRanges'] = self._value_ranges
        data['best_values'] = [str(value) for value in self._best_values]
        data['minimize'] = self._minimize
        data['num_employers'] = self._num_employers
        data['best_score'] = str(self._best_score)
        data['limit'] = self._limit
        data['best_error'] = self._best_error
        with open(filename, 'w') as outfile:
            json.dump(data, outfile, indent=4, sort_keys=True)
125466
def move_file(source, dest):
    
    import shutil
    shutil.copy(source, dest)
    remove_file(source)
1007702
def move(self, path, raise_if_exists=False):
        
        self.fs.move(self.path, path, raise_if_exists)
1024158
def copy_file(self, src_path, file_name, key=None):
        
        path = os.path.join(self._directories[key], file_name)
        shutil.copyfile(src_path, path)
21950
def path(self, **kwargs):
        
        new_path = path(self.getPath(), **kwargs)
        return File(new_path)
1358672
public final static void move(File fromFile, File toFile)
            throws IOException {
        // try the simple way first.
        if (fromFile.renameTo(toFile)) {
            return;
        }

        // copy to the temp file, then rename to the desired name.
        checkThatFileDoesntExist(toFile);
        File tempFile = createTempFile(toFile);
        checkThatFileDoesntExist(tempFile);
        copy(fromFile, tempFile);
        tempFile.renameTo(toFile);
        // delete the old one
        if (!fromFile.delete()) {
            throw new IOException("Failed to delete '" + fromFile.getParent()
                    + "'");
        }
    }