Update absolute file path according to the directory and filename.

@param filename filename to save
770647
@SuppressWarnings("ResultOfMethodCallIgnored") void updateDestinationFilePath(String filename) {
    String separator = destinationDirectory.endsWith("/") ? "" : File.separator;
    destinationFilePath = destinationDirectory + separator + filename;
    Log.d("TAG", "destinationFilePath: " + destinationFilePath);
    /* if the destination path is directory */
    File file = new File(destinationFilePath);
    if (!file.getParentFile().exists()) {
      /* make dirs in case */
      file.getParentFile().mkdirs();
    }
  }
535050
public File pathToFile( String fileName )
        throws IOException
    {
        String cwd = (String)getu("bsh.cwd");
        File file = new File( fileName );

        // if relative, fix up to bsh.cwd
        if ( !file.isAbsolute() ) {
            file = new File( cwd + File.separator + fileName );
        }

        return new File( file.getCanonicalPath() );
    }
1296212
public void setFileFromAJar(String fileName) {
        InputStream is = this.getClass().getResourceAsStream(fileName);
        if(is != null) {
            this.fileName = fileName;
            reader = new InputStreamReader(is);
        }
    }
685586
def save(self, filename):
        
        self.doc.save(os.path.expanduser(filename))
244370
private void updateList(final File filename) {
        try {
            final URI reletivePath = toURI(filename.getAbsolutePath().substring(new File(normalize(tempDir.toString())).getPath().length() + 1));
            final FileInfo f = job.getOrCreateFileInfo(reletivePath);
            if (hasConref) {
                f.hasConref = true;
            }
            if (hasKeyref) {
                f.hasKeyref = true;
            }
            job.write();
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            logger.error(e.getMessage(), e) ;
        }
    }
287917
def addFilename( self, filename ):
        
        filename = os.path.normpath(nativestring(filename))
        
        if filename in self._filenames:
            self._filenames.remove(filename)
        
        self._filenames.insert(0, filename)
        self._filenames = self._filenames[:self.maximumLength()]
        
        self.refresh()
3249
private void checkForExistence(String fileName) throws IOException {
        File file = new File(fileName);
        if (!file.exists()) {
            throw new FileNotFoundException("File with name " + fileName + " does not exist.");
        }
        if (!file.isFile()) {
            throw new IOException("Provided string does not correspond to an actual file.");
        }

    }
799061
protected void snapshot(String fileName) throws Exception {
	    configuration.save(new File(fileName));
        model.snapshotSessionDb(this.fileName, fileName);
	}
161665
public void addDir(String dirName) {
        Path dir = Paths.get(dirName);

        if (Files.isDirectory(dir)) {
            list.add(new DirPathEntry(dir));
        }
    }
272049
protected static function updateRoutingFile( $filename )
	{
		$content = '';

		if( file_exists( $filename ) && ( $content = file_get_contents( $filename ) ) === false ) {
			throw new \RuntimeException( sprintf( 'File "%1$s" not readable', $filename ) );
		}

		if( strpos( $content, 'fos_user:' ) === false )
		{
			$content .= "\n" . 'fos_user:
    resource: "@FOSUserBundle/Resources/config/routing/all.xml"';
		}

		if( strpos( $content, 'aimeos_shop:' ) === false )
		{
			$content .= "\n" . 'aimeos_shop:
    resource: "@AimeosShopBundle/Resources/config/routing.yml"
    prefix: /';
		}

		$fs = new Filesystem();
		$fs->dumpFile( $filename, $content );
	}
603472
private String setCurrentFilename(String relativePathOrPackage, String filename, String domain) throws Exception {
        currentFullFilename = convertToFullFilename(relativePathOrPackage, filename, domain);
        return "";
    }
959702
public static void copyFile(String fileName, String newFileName, boolean overwriteExisting) throws IOException {
		copyFile(new File(fileName), newFileName, overwriteExisting);
	}
110304
public void setOutputFile (final File value)
  {
    if (value != null && !value.isAbsolute ())
    {
      throw new IllegalArgumentException ("path is not absolute: " + value);
    }
    this.outputFile = value;
  }
1164347
def save(self, filename):
        
        with open(filename, "wb") as fd:
            fd.write(self.__buff)
972495
public void setDirectory(final String directory) {
        this.directory = new File(this.configuration.getDirectory(), directory);
        if (!this.directory.exists()) {
            throw new IllegalArgumentException(String.format(
                    "Directory does not exist: %s.\n" +
                            "Configuration contained value %s which is supposed to be relative to " +
                            "configuration directory.",
                    this.directory, directory));
        }

        if (!this.directory.getAbsolutePath()
                .startsWith(this.configuration.getDirectory().getAbsolutePath())) {
            throw new IllegalArgumentException(String.format(
                    "All files and directories must be contained in the configuration directory the " +
                            "directory provided in the configuration breaks that contract: %s in config " +
                            "file resolved to %s.",
                    directory, this.directory));
        }
    }
260331
function addFile(filename) {
        if (ignoredPaths.contains(filename)) {
            return;
        }
        filename = fs.realpathSync(filename);
        if (added[filename]) {
            return;
        }
        files.push(filename);
        added[filename] = true;
    }
494321
@Override
        public void setDirectory(File dir) {
                if (dir == null) {
                        throw new BuildException("Cannot set null directory attribute.");
                }

                // no override
                if (this.directory == null) {
                        this.directory = new File(dir.getAbsolutePath());
                }
        }