/haiku/src/preferences/shortcuts/ |
H A D | ShortcutsSpec.cpp | 453 BString file(directoryName); 454 DoStandardEscapes(file); 457 file += "/"; 459 file += result; 462 const char* fileStr = file.String(); 464 file.RemoveLast("/"); 466 // and re-append it iff the file is a dir. 467 BDirectory testFileAsDir(file.String()); 468 if ((strcmp(file.String(), "/") != 0) 470 file [all...] |
/haiku/src/tools/fs_shell/ |
H A D | fssh.cpp | 331 list_entry(const char* file, const char* name = NULL) argument 336 path = file; 339 file = path.c_str(); 341 name = file; 343 // stat the file 345 fssh_status_t error = _kern_read_stat(-1, file, false, &st, sizeof(st)); 347 fprintf(stderr, "Error: Failed to stat() \"%s\": %s\n", file, 379 // get file type 402 error = _kern_read_link(-1, file, buffer, &size); 430 // TODO file/director 700 const char *file = argv[argi]; local 739 const char* file = *files; local 950 const char* file = *files; local 1011 const char* file = argv[argi]; local [all...] |
/haiku/src/tools/restest/ |
H A D | ResourceFile.cpp | 23 // recognized file types (indices into kFileTypeNames) 34 "x86 resource file", 35 "PPC resource file", 36 "ELF object file", 37 "PEF object file", 46 read_exactly(BPositionIO& file, off_t position, void* buffer, size_t size, argument 49 ssize_t read = file.ReadAt(position, buffer, size); 205 ResourceFile::Init(BFile& file) argument 209 _InitFile(file); 227 // file 567 _InitFile(BFile& file) argument 621 _InitELFFile(BFile& file) argument 781 _InitPEFFile(BFile& file, const PEFContainerHeader& pefHeader) argument [all...] |
/haiku/src/kits/translation/ |
H A D | TranslationUtils.cpp | 66 // Returns a BBitmap object for the bitmap file or resource 68 // to open kName as a file, then as a resource. 72 // Parameters: kName, the name of the bitmap file or resource to 78 // Returns: NULL, if the file could not be opened and the 87 // Try loading a bitmap from the file named name 124 // Load the bitmap resource from the application file 147 // and name does not uniquely identify a resource in a file. 171 // Load the bitmap resource from the application file 188 // Returns a BBitmap object for the bitmap file named kName. 193 // Parameters: kName, the name of the bitmap file 619 WriteStyledEditFile(BTextView* view, BFile* file, const char *encoding) argument 742 WriteStyledEditFile(BTextView* view, BFile* file) argument [all...] |
/haiku/src/servers/media/ |
H A D | DefaultManager.cpp | 25 /* no locking used in this file, we assume that the caller (NodeManager) does it. 97 BFile file(path.Path(), B_READ_ONLY); 101 if (file.Read(fBeginHeader, size) < size) 107 if (file.Read(&categoryCount, size) < size) { 117 if (file.Read(&msg_header, size) < size) { 122 if (file.Read(&default_type, size) < size) { 127 if (settings.Unflatten(&file) == B_OK) 133 if (file.Read(fEndHeader,size) < size) { 196 BFile file(path.Path(), B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE); 198 if (file [all...] |
/haiku/src/kits/locale/ |
H A D | LocaleRosterData.cpp | 449 BFile file; local 453 status = file.SetTo(path.Path(), B_READ_ONLY); 457 status = settings.Unflatten(&file); 473 // Something went wrong (no settings file or invalid BMessage), so we 491 BFile file; local 495 status = file.SetTo(path.Path(), B_READ_ONLY); 499 status = settings.Unflatten(&file); 510 // Something went wrong (no settings file or invalid BMessage), so we 532 BFile file; local 535 status = file 557 BFile file; local [all...] |
/haiku/src/add-ons/input_server/filters/shortcut_catcher/ |
H A D | KeyCommandMap.cpp | 78 KeyCommandMap::KeyCommandMap(const char* file) argument 83 fFileName = new char[strlen(file) + 1]; 84 strcpy(fFileName, file); 232 // only fall through for appropriate file 249 BFile file(fFileName, B_READ_ONLY); 252 if (file.InitCheck() == B_OK && fileMessage.Unflatten(&file) 254 file.GetNodeRef(&fNodeRef);
|
/haiku/src/apps/mail/ |
H A D | Settings.cpp | 182 BFile file; local 183 status = file.SetTo(path.Path(), 218 status = settings.Flatten(&file); 220 // replace original settings file 242 BFile file; local 243 status = file.SetTo(path.Path(), B_READ_ONLY); 247 status = file.SetTo(path.Path(), B_READ_ONLY); 253 status = settings.Unflatten(&file);
|
/haiku/src/tests/kits/storage/ |
H A D | MimeTypeTest.cpp | 1633 // manually added such a file :-) 1713 // manually added such a file :-) 2170 // Manually removes the file in the MIME database corresponding to 2177 // corresponding file is created in the database, we need to do 2189 // Manually verifies that the file in the MIME database corresponding to 2196 // corresponding file is created in the database, we need to do 2642 BFile file(&entry, B_READ_ONLY); 2643 CHK(file.InitCheck() == B_OK); 2645 CHK(msg.Unflatten(&file) == B_OK); 3195 // - set icon, preferred app, attr info, file ex [all...] |
/haiku/src/apps/workspaces/ |
H A D | Workspaces.cpp | 4 * This file is distributed under the terms of the MIT License. 66 OpenSettingsFile(BFile& file, int mode) argument 79 status = file.SetTo(path.Path(), mode); 83 status = file.SetTo(path.Path(), mode); 220 BFile file; local 221 if (OpenSettingsFile(file, B_READ_ONLY) == B_OK) { 223 if (settings.Unflatten(&file) == B_OK) { 238 BFile file(path.Path(), B_READ_ONLY); 239 if (file.InitCheck() == B_OK 240 && file 265 BFile file; local 497 BFile file; local 509 BFile file; local [all...] |
/haiku/src/preferences/keymap/ |
H A D | Keymap.cpp | 122 //! Load a map from a file 131 BFile file(&entry, B_READ_ONLY); 132 status = SetTo(file); 138 ssize_t bytesRead = file.ReadAttr("keymap:name", B_STRING_TYPE, 0, fName, 149 //! We save a map to a file 153 BFile file; local 154 status_t status = file.SetTo(&ref, 164 ssize_t bytesWritten = file.Write(&fKeys, sizeof(fKeys)); 174 bytesWritten = file.Write(&fCharsSize, sizeof(uint32)); 182 bytesWritten = file [all...] |
/haiku/src/apps/diskprobe/ |
H A D | DiskProbe.cpp | 69 status_t Open(BFile* file, int32 mode); 126 BFile file; local 127 if (Open(&file, B_READ_ONLY) != B_OK) 134 if (file.Read(&settings, sizeof(settings)) == sizeof(settings)) { 175 BFile file; 176 if (Open(&file, B_CREATE_FILE | B_WRITE_ONLY) != B_OK) 202 file.Write(&settings, sizeof(settings)); 207 Settings::Open(BFile* file, int32 mode) argument 215 return file->SetTo(path.Path(), mode); 273 // if not, ask the user to open a file [all...] |
/haiku/src/tests/kits/translation/ |
H A D | BitmapStreamTest.cpp | 141 BFile file("../src/tests/kits/translation/data/images/image.jpg", 143 CPPUNIT_ASSERT(file.InitCheck() == B_OK); 145 //translate a file into a BBitmapStream 150 CPPUNIT_ASSERT(proster->Translate(&file, NULL, NULL, pstream, 329 BFile file("../src/tests/kits/translation/data/images/image.jpg", 331 CPPUNIT_ASSERT(file.InitCheck() == B_OK); 333 //translate a file into a BBitmapStream 337 CPPUNIT_ASSERT(proster->Translate(&file, NULL, NULL, &stream, 419 BFile file("../src/tests/kits/translation/data/images/image.jpg", 421 CPPUNIT_ASSERT(file [all...] |
/haiku/src/preferences/input/ |
H A D | MouseSettings.cpp | 21 // The R5 settings file differs from that of Haiku; 118 BFile file(path.Path(), B_READ_ONLY); 119 if (file.InitCheck() < B_OK) 122 // Read the settings from the file 123 file.Read((void*)&fSettings, sizeof(mouse_settings)); 413 BFile file(path.Path(), B_READ_ONLY); 414 if (file.InitCheck() < B_OK) 419 if (message.Unflatten(&file) == B_OK) { 468 BFile file(path.Path(), B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE); 469 status = file [all...] |
/haiku/src/tools/elfsymbolpatcher/ |
H A D | ElfFile.cpp | 25 // Description: Implementation of classes for accessing ELF file, 43 read_exactly(BPositionIO &file, off_t position, void *buffer, size_t size, argument 47 ssize_t read = file.ReadAt(position, buffer, size); 65 void SetTo(ElfFile* file, Elf_Shdr* header); 107 ElfSection::SetTo(ElfFile* file, Elf_Shdr* header) argument 110 fFile = file; 199 BFile* file = fFile->GetFile(); local 205 error = read_exactly(*file, fHeader->sh_offset, fData, 434 ElfRelocationIterator::ElfRelocationIterator(ElfFile* file) argument 435 : fFile(file), [all...] |
/haiku/src/system/libroot/posix/glibc/libio/ |
H A D | iofopncook.c | 2 This file is part of the GNU C Library. 19 As a special exception, if you link the code in this file with 23 however invalidate any other reasons why the executable file 125 INTUSE(_IO_init) (&cfile->__fp.file, 0); 133 cfile->__fp.file._IO_file_flags = 134 _IO_mask_flags (&cfile->__fp.file, read_write, 138 this special stream is not associated with a real file, but still has 140 cfile->__fp.file._fileno = -2; 180 new_f->cfile.__fp.file._lock = &new_f->lock;
|
/haiku/src/apps/mediaconverter/ |
H A D | MediaFileInfoView.cpp | 4 // This file may be used under the terms of the Be Sample Code License. 51 DrawString(B_TRANSLATE("No file selected"), labelStart); 136 fNoFileLabelWidth = ceilf(bold.StringWidth(B_TRANSLATE("No file selected"))); 151 MediaFileInfoView::Update(BMediaFile* file, entry_ref* ref) argument 153 if (fMediaFile == file) 156 fMediaFile = file; 158 if (file != NULL && ref != NULL) { 160 status_t result = fInfo.LoadInfo(file); 163 "file info.\n\nError : "));
|
/haiku/src/add-ons/kernel/file_systems/nfs4/idmapper/ |
H A D | IdMapper.cpp | 228 BFile file(path.Path(), B_READ_ONLY); 229 if (file.InitCheck() != B_OK) 230 return file.InitCheck(); 233 result = file.GetSize(&size); 241 file.Read(buffer, size);
|
/haiku/src/kits/storage/mime/ |
H A D | MimeInfoUpdater.cpp | 101 // If not forced, only update if the entry has no file type attribute 129 // update the app file info attributes, if this is a shared object 130 BFile file; local 135 && (err = file.SetTo(&entry, B_READ_WRITE)) == B_OK 136 && (err = appFileInfoRead.SetTo(&file)) == B_OK 137 && (err = appFileInfoWrite.SetTo(&file)) == B_OK) { 169 file.RemoveAttr(kAppFlagsAttribute);
|
/haiku/src/kits/package/hpkg/ |
H A D | RepositoryReaderImpl.cpp | 186 // open file 190 "Error: Failed to open repository file \"%s\": %s\n", fileName, 202 BFdIO* file = new(std::nothrow) BFdIO(fd, keepFD); local 203 if (file == NULL) { 209 return Init(file, true); 214 RepositoryReaderImpl::Init(BPositionIO* file, bool keepFile) argument 218 B_HPKG_REPO_VERSION, B_HPKG_REPO_MINOR_VERSION>(file, keepFile, header,
|
/haiku/src/tests/kits/media/mpeg2_decoder_test/ |
H A D | mpeg2_decoder_test.cpp | 15 The test requires a MPEG2 test file at the same directory you start the 16 test from. Normally there is a test file included at the same location 17 this source file is located if not have a look at the git history. 22 The originally included test file results in 85 PNG images, 24 This test file has the following properties: 79 FileDecoder(BFile* file) : BMediaDecoder() { argument 80 sourceFile = file; 293 BFile file(*filePath, B_CREATE_FILE | B_ERASE_FILE | B_WRITE_ONLY); 294 status_t creatingFileStatus = file.InitCheck(); 304 &bitmapStream, NULL, NULL, &file, bitmapStorageForma [all...] |
/haiku/src/add-ons/mail_daemon/inbound_protocols/imap/ |
H A D | IMAPFolder.h | 80 BFile& file); 81 void MessageStored(entry_ref& ref, BFile& file, 90 BFile& file); 91 void BodyStored(entry_ref& ref, BFile& file, 132 status_t _WriteStream(BFile& file, BDataIO& stream,
|
/haiku/src/preferences/notifications/ |
H A D | PrefletWin.cpp | 113 // Save settings file 114 BFile file(path.Path(), B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE); 115 ret = settingsStore.Flatten(&file); 125 file.Unset(); 183 BFile file(path.Path(), B_READ_ONLY); 184 settings.Unflatten(&file);
|
/haiku/src/tests/add-ons/translators/tifftranslator/ |
H A D | TIFFTranslatorTest.cpp | 91 BFile file; local 93 CPPUNIT_ASSERT(file.SetTo(pinfo[i].imagePath, B_READ_ONLY) == B_OK); 98 CPPUNIT_ASSERT(proster->Identify(&file, NULL, &ti) == B_OK); 107 CPPUNIT_ASSERT(proster->Identify(&file, NULL, &ti, 0, NULL, 117 CPPUNIT_ASSERT(proster->Identify(&file, NULL, &ti, 0, NULL, 242 // Perform translations on every file in the array
|
/haiku/src/add-ons/network_settings/dnsclient/ |
H A D | DNSSettingsView.cpp | 247 BFile file(path.Path(), B_CREATE_FILE | B_ERASE_FILE | B_WRITE_ONLY); 248 if (file.InitCheck() != B_OK) { 250 strerror(file.InitCheck())); 251 return file.InitCheck(); 267 return file.Write(content.String(), content.Length());
|