Lines Matching refs:rv

23 void VerifyResult(nsresult rv)
25 if (NS_FAILED(rv))
27 Failed("rv failed");
28 printf("rv = %d\n", rv);
64 nsresult rv;
69 rv = file->GetNativePath(pathName);
70 VerifyResult(rv);
78 nsresult rv = CallCreateInstance(NS_LOCAL_FILE_CONTRACTID, &file);
81 if (NS_FAILED(rv) || (!file))
92 rv = file->InitWithNativePath(nsDependentCString(creationPath));
93 VerifyResult(rv);
96 rv = file->GetNativeLeafName(leafName);
98 VerifyResult(rv);
101 rv = file->AppendNative(nsDependentCString(appendPath));
102 VerifyResult(rv);
105 rv = file->GetNativeLeafName(leafName);
107 VerifyResult(rv);
127 nsresult rv;
129 do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
131 if (NS_FAILED(rv) || (!file))
140 rv = file->InitWithNativePath(nsDependentCString(creationPath));
141 VerifyResult(rv);
144 rv = file->AppendRelativeNativePath(nsDependentCString(appendPath));
145 VerifyResult(rv);
158 rv = file->Create(whatToCreate, perm);
159 VerifyResult(rv);
161 rv = file->Exists(&exists);
162 VerifyResult(rv);
176 nsresult rv;
178 do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
180 if (NS_FAILED(rv) || (!file))
189 rv = file->InitWithNativePath(nsDependentCString(creationPath));
190 VerifyResult(rv);
193 rv = file->AppendNative(nsDependentCString(appendPath));
194 VerifyResult(rv);
207 rv = file->CreateUnique(whatToCreate, perm);
208 VerifyResult(rv);
210 rv = file->Exists(&exists);
211 VerifyResult(rv);
228 nsresult rv;
230 do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
232 if (NS_FAILED(rv) || (!file))
238 rv = file->InitWithNativePath(nsDependentCString(testFile));
239 VerifyResult(rv);
242 do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
244 if (NS_FAILED(rv) || (!dir))
250 rv = dir->InitWithNativePath(nsDependentCString(targetDir));
251 VerifyResult(rv);
253 rv = file->CopyTo(dir, EmptyString());
254 VerifyResult(rv);
262 nsresult rv;
264 do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
266 if (NS_FAILED(rv) || (!file))
275 rv = file->InitWithNativePath(nsDependentCString(creationPath));
276 VerifyResult(rv);
279 rv = file->AppendNative(nsDependentCString(appendPath));
280 VerifyResult(rv);
292 rv = file->Remove(recursive);
293 VerifyResult(rv);
295 rv = file->Exists(&exists);
296 VerifyResult(rv);
313 nsresult rv;
322 rv = file->InitWithNativePath(nsDependentCString(testFile));
323 VerifyResult(rv);
333 rv = dir->InitWithNativePath(nsDependentCString(targetDir));
334 VerifyResult(rv);
336 rv = file->MoveToNative(dir, NS_LITERAL_CSTRING("newtemp"));
337 VerifyResult(rv);
338 if (NS_FAILED(rv))
352 nsresult rv;
361 rv = file->InitWithNativePath(nsDependentCString(testPath));
362 VerifyResult(rv);
368 rv = file->GetParent(getter_AddRefs(parent));
369 VerifyResult(rv);
370 rv = parent->GetPath(path);
371 VerifyResult(rv);
372 rv = file->InitWithPath(path);
373 VerifyResult(rv);
381 rv = parent->Append(NS_LITERAL_STRING("foo"));
382 VerifyResult(rv);
383 rv = parent->Append(NS_LITERAL_STRING("bar"));
384 VerifyResult(rv);
386 rv = parent->Normalize();
387 VerifyResult(rv);
390 rv = parent->GetNativePath(newPath);
391 VerifyResult(rv);
401 rv = expectedFile->InitWithNativePath(nsDependentCString(expected));
402 VerifyResult(rv);
404 rv = expectedFile->Normalize();
405 VerifyResult(rv);
408 rv = expectedFile->GetNativePath(expectedPath);
409 VerifyResult(rv);