Lines Matching defs:file

62 void GetPaths(nsILocalFile* file)
69 rv = file->GetNativePath(pathName);
77 nsILocalFile* file = nsnull;
78 nsresult rv = CallCreateInstance(NS_LOCAL_FILE_CONTRACTID, &file);
81 if (NS_FAILED(rv) || (!file))
92 rv = file->InitWithNativePath(nsDependentCString(creationPath));
96 rv = file->GetNativeLeafName(leafName);
101 rv = file->AppendNative(nsDependentCString(appendPath));
105 rv = file->GetNativeLeafName(leafName);
109 GetPaths(file);
115 file->Exists(&exists);
128 nsCOMPtr<nsILocalFile> file =
131 if (NS_FAILED(rv) || (!file))
140 rv = file->InitWithNativePath(nsDependentCString(creationPath));
144 rv = file->AppendRelativeNativePath(nsDependentCString(appendPath));
150 file->Exists(&exists);
158 rv = file->Create(whatToCreate, perm);
161 rv = file->Exists(&exists);
167 Failed("Did not create file system object!");
177 nsCOMPtr<nsILocalFile> file =
180 if (NS_FAILED(rv) || (!file))
189 rv = file->InitWithNativePath(nsDependentCString(creationPath));
193 rv = file->AppendNative(nsDependentCString(appendPath));
199 file->Exists(&exists);
207 rv = file->CreateUnique(whatToCreate, perm);
210 rv = file->Exists(&exists);
216 Failed("Did not create file system object!");
229 nsCOMPtr<nsILocalFile> file =
232 if (NS_FAILED(rv) || (!file))
238 rv = file->InitWithNativePath(nsDependentCString(testFile));
253 rv = file->CopyTo(dir, EmptyString());
263 nsCOMPtr<nsILocalFile> file =
266 if (NS_FAILED(rv) || (!file))
275 rv = file->InitWithNativePath(nsDependentCString(creationPath));
279 rv = file->AppendNative(nsDependentCString(appendPath));
285 file->Exists(&exists);
292 rv = file->Remove(recursive);
295 rv = file->Exists(&exists);
314 nsCOMPtr<nsILocalFile> file(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
316 if (!file)
322 rv = file->InitWithNativePath(nsDependentCString(testFile));
336 rv = file->MoveToNative(dir, NS_LITERAL_CSTRING("newtemp"));
353 nsCOMPtr<nsILocalFile> file(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID));
355 if (!file)
361 rv = file->InitWithNativePath(nsDependentCString(testPath));
368 rv = file->GetParent(getter_AddRefs(parent));
372 rv = file->InitWithPath(path);
432 CreationTest("c:\\temp\\", "file.txt", nsIFile::NORMAL_FILE_TYPE, 0644);
433 DeletionTest("c:\\temp\\", "file.txt", PR_FALSE);
453 CreationTest("/tmp", "file.txt", nsIFile::NORMAL_FILE_TYPE, 0644);
454 DeletionTest("/tmp/", "file.txt", PR_FALSE);
459 CreationTest("/tmp", "file", nsIFile::NORMAL_FILE_TYPE, 0644);
460 CopyTest("/tmp/file", "/tmp/newDir");
461 MoveTest("/tmp/file", "/tmp/newDir/anotherNewDir");