Searched refs:new_path (Results 1 - 25 of 81) sorted by relevance

1234

/external/chromium_org/content/browser/download/
H A Dbase_file_posix.cc13 const base::FilePath& new_path) {
15 // to |new_path|. Here, we try to fix up the destination file with appropriate
20 if (!base::PathExists(new_path)) {
21 int write_error = file_util::WriteFile(new_path, "", 0);
25 int stat_error = stat(new_path.value().c_str(), &st);
32 if (!base::Move(full_path_, new_path))
37 int chmod_error = chmod(new_path.value().c_str(), st.st_mode);
12 MoveFileAndAdjustPermissions( const base::FilePath& new_path) argument
H A Ddownload_file_impl.cc111 base::FilePath new_path(full_path);
114 new_path, base::FilePath::StringType());
116 new_path = new_path.InsertBeforeExtensionASCII(
120 DownloadInterruptReason reason = file_.Rename(new_path);
129 new_path.clear();
134 base::Bind(callback, reason, new_path));
142 base::FilePath new_path(full_path);
147 reason = file_.Rename(new_path);
167 new_path
[all...]
/external/chromium/net/base/
H A Dnet_util_posix.cc46 std::string new_path; local
48 new_path = old_path;
49 ReplaceSubstringsAfterOffset(&new_path, 0, "//", "/");
50 old_path.swap(new_path);
51 } while (new_path != old_path);
/external/linux-tools-perf/util/
H A Dexec_cmd.c85 struct strbuf new_path = STRBUF_INIT; local
87 add_path(&new_path, perf_exec_path());
88 add_path(&new_path, argv0_path);
91 strbuf_addstr(&new_path, old_path);
93 strbuf_addstr(&new_path, "/usr/local/bin:/usr/bin:/bin");
95 setenv("PATH", new_path.buf, 1);
97 strbuf_release(&new_path);
/external/chromium/chrome/browser/download/
H A Dbase_file.cc87 bool BaseFile::Rename(const FilePath& new_path) { argument
96 if (new_path == full_path_) {
106 file_util::CreateDirectory(new_path.DirName());
112 if (!file_util::RenameFileAndResetSecurityDescriptor(full_path_, new_path))
117 // 600 to |new_path|. Here, we try to fix up the destination file with
122 if (!file_util::PathExists(new_path))
123 file_util::WriteFile(new_path, "", 0);
124 bool stat_succeeded = (stat(new_path.value().c_str(), &st) == 0);
128 if (!file_util::Move(full_path_, new_path))
132 chmod(new_path
[all...]
H A Dbase_file_unittest.cc130 FilePath new_path(temp_dir_.path().AppendASCII("NewFile"));
131 EXPECT_FALSE(file_util::PathExists(new_path));
135 EXPECT_TRUE(base_file_->Rename(new_path));
137 EXPECT_TRUE(file_util::PathExists(new_path));
197 FilePath new_path(temp_dir_.path().AppendASCII("NewFile"));
198 EXPECT_FALSE(file_util::PathExists(new_path));
202 EXPECT_TRUE(base_file_->Rename(new_path));
204 EXPECT_TRUE(file_util::PathExists(new_path));
215 FilePath new_path(temp_dir_.path().AppendASCII("NewFile"));
216 EXPECT_FALSE(file_util::PathExists(new_path));
[all...]
H A Ddownload_manager_unittest.cc354 FilePath new_path(kDownloadRenameCases[i].suggested_path);
365 EXPECT_CALL(*download_file, Rename(new_path)).WillOnce(Return(true));
368 FilePath crdownload(download_util::GetCrDownloadPath(new_path));
375 2, new_path))));
382 FileSelected(new_path, i, info);
384 FileSelected(new_path, i, info);
409 const FilePath new_path(FILE_PATH_LITERAL("foo.zip"));
410 const FilePath cr_path(download_util::GetCrDownloadPath(new_path));
432 info->path = new_path;
475 const FilePath new_path(FILE_PATH_LITERA
[all...]
H A Ddownload_history.h41 // Updates the download path for |download_item| to |new_path|.
43 const FilePath& new_path);
H A Ddownload_history.cc85 const FilePath& new_path) {
93 hs->UpdateDownloadPath(new_path, download_item->db_handle());
84 UpdateDownloadPath(DownloadItem* download_item, const FilePath& new_path) argument
/external/chromium/third_party/libjingle/source/talk/base/
H A Dfileutils.h169 // This moves a file from old_path to new_path, where "old_path" is a
175 const Pathname &new_path) = 0;
177 // This moves a directory from old_path to new_path, where "old_path" is a
182 virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path) = 0;
184 // This attempts to move whatever is located at old_path to new_path,
186 bool MoveFileOrFolder(const Pathname &old_path, const Pathname &new_path) { argument
188 return MoveFile(old_path, new_path);
190 return MoveFolder(old_path, new_path);
194 // This copies a file from old_path to new_path. This method ASSERTs and
197 virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path)
202 CopyFileOrFolder(const Pathname &old_path, const Pathname &new_path) argument
334 MoveFolder(const Pathname &old_path, const Pathname &new_path) argument
338 MoveFile(const Pathname &old_path, const Pathname &new_path) argument
342 CopyFolder(const Pathname &old_path, const Pathname &new_path) argument
346 CopyFile(const Pathname &old_path, const Pathname &new_path) argument
[all...]
H A Dunixfilesystem.h60 // This moves a file from old_path to new_path, where "file" can be a plain file
63 virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path);
64 virtual bool MoveFolder(const Pathname &old_path, const Pathname &new_path);
69 virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path);
H A Dwin32filesystem.h59 // This moves a file from old_path to new_path. If the new path is on a
63 virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path);
65 // Moves a folder from old_path to new_path. If the new path is on a different
68 virtual bool MoveFolder(const Pathname &old_path, const Pathname &new_path);
72 virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path);
H A Dunixfilesystem.cc221 const Pathname &new_path) {
227 << " to " << new_path.pathname();
228 if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) {
231 if (!CopyFile(old_path, new_path))
240 const Pathname &new_path) {
246 << " to " << new_path.pathname();
247 if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) {
250 if (!CopyFolder(old_path, new_path))
266 const Pathname &new_path) {
268 << " to " << new_path
220 MoveFile(const Pathname &old_path, const Pathname &new_path) argument
239 MoveFolder(const Pathname &old_path, const Pathname &new_path) argument
265 CopyFile(const Pathname &old_path, const Pathname &new_path) argument
[all...]
/external/chromium_org/third_party/libjingle/source/talk/base/
H A Dfileutils.h171 // This moves a file from old_path to new_path, where "old_path" is a
177 const Pathname &new_path) = 0;
179 // This moves a directory from old_path to new_path, where "old_path" is a
184 virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path) = 0;
186 // This attempts to move whatever is located at old_path to new_path,
188 bool MoveFileOrFolder(const Pathname &old_path, const Pathname &new_path) { argument
190 return MoveFile(old_path, new_path);
192 return MoveFolder(old_path, new_path);
196 // This copies a file from old_path to new_path. This method ASSERTs and
199 virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path)
204 CopyFileOrFolder(const Pathname &old_path, const Pathname &new_path) argument
336 MoveFolder(const Pathname &old_path, const Pathname &new_path) argument
340 MoveFile(const Pathname &old_path, const Pathname &new_path) argument
344 CopyFolder(const Pathname &old_path, const Pathname &new_path) argument
348 CopyFile(const Pathname &old_path, const Pathname &new_path) argument
[all...]
H A Dwin32filesystem.h59 // This moves a file from old_path to new_path. If the new path is on a
63 virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path);
65 // Moves a folder from old_path to new_path. If the new path is on a different
68 virtual bool MoveFolder(const Pathname &old_path, const Pathname &new_path);
72 virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path);
H A Dunixfilesystem.h77 // This moves a file from old_path to new_path, where "file" can be a plain
80 virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path);
81 virtual bool MoveFolder(const Pathname &old_path, const Pathname &new_path);
86 virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path);
H A Dunixfilesystem.cc215 const Pathname &new_path) {
221 << " to " << new_path.pathname();
222 if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) {
225 if (!CopyFile(old_path, new_path))
234 const Pathname &new_path) {
240 << " to " << new_path.pathname();
241 if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) {
244 if (!CopyFolder(old_path, new_path))
260 const Pathname &new_path) {
262 << " to " << new_path
214 MoveFile(const Pathname &old_path, const Pathname &new_path) argument
233 MoveFolder(const Pathname &old_path, const Pathname &new_path) argument
259 CopyFile(const Pathname &old_path, const Pathname &new_path) argument
[all...]
/external/chromium_org/chrome/test/webdriver/
H A Dframe_path.cc38 std::string new_path = path_;
40 new_path += "\n";
41 return FramePath(new_path + path);
/external/chromium_org/extensions/common/
H A Did_util.cc49 base::FilePath new_path = MaybeNormalizePath(path); local
51 std::string(reinterpret_cast<const char*>(new_path.value().data()),
52 new_path.value().size() * sizeof(base::FilePath::CharType));
/external/chromium/net/test/
H A Dpython_utils.cc30 std::string new_path(old_path);
32 new_path.append(";");
34 new_path.append(":");
36 new_path.append(dir_path.c_str());
37 env->SetVar(kPythonPathEnv, new_path);
/external/chromium_org/net/base/
H A Dnet_util_posix.cc54 std::string new_path; local
56 new_path = old_path;
57 ReplaceSubstringsAfterOffset(&new_path, 0, "//", "/");
58 old_path.swap(new_path);
59 } while (new_path != old_path);
/external/chromium_org/net/test/
H A Dpython_utils.cc31 std::string new_path(old_path);
33 new_path.append(";");
35 new_path.append(":");
37 new_path.append(dir_path.c_str());
38 env->SetVar(kPythonPathEnv, new_path);
/external/chromium_org/tools/git/
H A Dmove_source_file.py127 def UpdateIncludeGuard(old_path, new_path):
128 """Updates the include guard in a file now residing at |new_path|,
135 new_guard = MakeIncludeGuardName(new_path)
137 with open(new_path) as f:
146 'include guard manually. (%s)' % new_path)
148 with open(new_path, 'w') as f:
/external/chromium_org/net/url_request/
H A Durl_request_file_job.cc126 std::string new_path = request_->url().path(); local
127 new_path.push_back('/');
129 replacements.SetPathStr(new_path);
142 base::FilePath new_path = file_path_;
144 resolved = base::win::ResolveShortcut(new_path, &new_path, NULL);
150 *location = FilePathToFileURL(new_path);
/external/chromium/net/url_request/
H A Durl_request_file_job.cc234 std::string new_path = request_->url().path(); local
235 new_path.push_back('/');
237 replacements.SetPathStr(new_path);
250 FilePath new_path = file_path_;
252 resolved = file_util::ResolveShortcut(&new_path);
258 *location = FilePathToFileURL(new_path);

Completed in 1815 milliseconds

1234