/** Builds the output filename. path = dir/name, and it replaces expected * .skp extension with .pdf extention. * @param path Output filename. * @param name The name of the file. * @returns false if the file did not has the expected extension. * if false is returned, contents of path are undefined. */ static bool make_output_filepath(SkString* path, const SkString& dir, const SkString& name) { sk_tools::make_filepath(path, dir, name); return replace_filename_extension(path, SKP_FILE_EXTENSION, PDF_FILE_EXTENSION); }
/** Builds the output filename. path = dir/name, and it replaces expected * .skp extension with .pdf extention. * @param path Output filename. * @param name The name of the file. * @returns false if the file did not has the expected extension. * if false is returned, contents of path are undefined. */ static bool make_output_filepath(SkString* path, const SkString& dir, const SkString& name) { *path = SkOSPath::Join(dir.c_str(), name.c_str()); return replace_filename_extension(path, SKP_FILE_EXTENSION, PDF_FILE_EXTENSION); }