Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 1360) sorted by relevance

12345678910>>...55

/haiku/src/tests/kits/storage/
H A DPathTest.cpp61 BPath path; in InitTest1() local
62 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT ); in InitTest1()
63 CPPUNIT_ASSERT( path.Path() == NULL ); in InitTest1()
71 BPath path(pathName); in InitTest1() local
72 CPPUNIT_ASSERT( path.InitCheck() == B_OK ); in InitTest1()
73 CPPUNIT_ASSERT( string(pathName) == path.Path() ); in InitTest1()
79 BPath path(pathName); in InitTest1() local
80 CPPUNIT_ASSERT( path.InitCheck() == B_OK ); in InitTest1()
81 CPPUNIT_ASSERT( string(pathName) == path.Path() ); in InitTest1()
87 BPath path(pathName); in InitTest1() local
[all …]
H A DFindDirectoryTest.cpp124 test_find_directory(directory_which dir, BPath &path, dev_t device) in test_find_directory() argument
140 path.SetTo(homePath.Path(), "Desktop"); in test_find_directory()
158 path.SetTo(homePath.Path(), "Desktop/Trash"); in test_find_directory()
164 path.SetTo(recycledPath.Path(), "_BEOS_"); in test_find_directory()
173 error = path.SetTo("/boot/beos"); in test_find_directory()
176 error = path.SetTo("/boot/beos/system"); in test_find_directory()
179 error = path.SetTo("/boot/beos/system/add-ons"); in test_find_directory()
182 error = path.SetTo("/boot/beos/system/boot"); in test_find_directory()
185 error = path.SetTo("/boot/beos/etc/fonts"); in test_find_directory()
188 error = path.SetTo("/boot/beos/system/lib"); in test_find_directory()
[all …]
/haiku/src/tests/system/kernel/fs/
H A DKPathTest.cpp39 vfs_normalize_path(const char* path, char* buffer, size_t bufferSize, in vfs_normalize_path() argument
92 KPath path; in TestSetToAndPath() local
93 status_t status = path.InitCheck(); in TestSetToAndPath()
96 status = path.SetTo("a/b/c"); in TestSetToAndPath()
98 CPPUNIT_ASSERT(strcmp(path.Path(), "a/b/c") == 0); in TestSetToAndPath()
99 CPPUNIT_ASSERT(path.Length() == 5); in TestSetToAndPath()
100 CPPUNIT_ASSERT(path.BufferSize() == B_PATH_NAME_LENGTH + 1); in TestSetToAndPath()
102 status = path.SetPath("abc/def"); in TestSetToAndPath()
104 CPPUNIT_ASSERT(strcmp(path.Path(), "abc/def") == 0); in TestSetToAndPath()
105 CPPUNIT_ASSERT(path.Length() == 7); in TestSetToAndPath()
[all …]
/haiku/src/build/libroot/
H A Dfs_darwin.cpp20 static int get_path(int fd, const char* path, char fullPath[]);
21 static int eaccess(const char* path, int accessMode);
25 get_path(int fd, const char* path, char fullPath[]) in get_path() argument
45 || strlcat(fullPath, path, MAXPATHLEN) > MAXPATHLEN) { in get_path()
56 eaccess(const char* path, int accessMode) in eaccess() argument
62 if (stat(path, &st) < 0) { in eaccess()
110 faccessat(int fd, const char* path, int accessMode, int flag) in faccessat() argument
118 if (fd == AT_FDCWD || (path != NULL && path[0] == '/')) { in faccessat()
120 return (flag & AT_EACCESS) != 0 ? eaccess(path, accessMode) in faccessat()
121 : access(path, accessMode); in faccessat()
[all …]
H A Dfind_directory.cpp30 create_path(const char *path, mode_t mode) in create_path() argument
36 if (path == NULL || ((pathLength = strlen(path)) > B_PATH_NAME_LENGTH)) in create_path()
40 const char *slash = strchr(&path[i], '/'); in create_path()
45 else if (i != slash - path) in create_path()
46 i = slash - path; in create_path()
50 strlcpy(buffer, path, i + 1); in create_path()
67 const char* path; in find_directory() local
70 path = HAIKU_BUILD_GENERATED_DIRECTORY "/tmp"; in find_directory()
73 path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/settings"; in find_directory()
76 path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/cache"; in find_directory()
[all …]
/haiku/src/add-ons/kernel/file_systems/userlandfs/server/fuse/
H A Dfuse_fs.cpp16 fuse_fs_getattr(struct fuse_fs* fs, const char* path, struct stat* buf) in fuse_fs_getattr() argument
20 return fs->ops.getattr(path, buf); in fuse_fs_getattr()
25 fuse_fs_fgetattr(struct fuse_fs* fs, const char* path, struct stat* buf, in fuse_fs_fgetattr() argument
30 return fs->ops.fgetattr(path, buf, fi); in fuse_fs_fgetattr()
44 fuse_fs_unlink(struct fuse_fs* fs, const char* path) in fuse_fs_unlink() argument
48 return fs->ops.unlink(path); in fuse_fs_unlink()
53 fuse_fs_rmdir(struct fuse_fs* fs, const char* path) in fuse_fs_rmdir() argument
57 return fs->ops.rmdir(path); in fuse_fs_rmdir()
62 fuse_fs_symlink(struct fuse_fs* fs, const char* linkname, const char* path) in fuse_fs_symlink() argument
66 return fs->ops.symlink(linkname, path); in fuse_fs_symlink()
[all …]
/haiku/src/system/libroot/posix/stdlib/
H A Dmktemp.c55 mkstemps(char *path, int slen) in mkstemps() argument
58 return _gettemp(path, &fd, 0, slen, 0) ? fd : -1; in mkstemps()
63 mkstemp(char *path) in mkstemp() argument
66 if (_gettemp(path, &fd, 0, 0, 0)) in mkstemp()
74 mkostemp(char *path, int oflags) in mkostemp() argument
77 if (_gettemp(path, &fd, 0, 0, oflags)) in mkostemp()
85 mkdtemp(path) in mkdtemp() argument
86 char *path; in mkdtemp()
88 return (_gettemp(path, (int *)NULL, 1, 0, 0) ? path : (char *)NULL);
93 mktemp(char *path) in mktemp() argument
[all …]
/haiku/src/kits/storage/
H A DRemoveEngine.cpp54 const char* path; in RemoveEntry() local
55 status_t error = entry.GetPath(pathBuffer, path); in RemoveEntry()
59 return _RemoveEntry(path); in RemoveEntry()
64 BRemoveEngine::_RemoveEntry(const char* path) in _RemoveEntry() argument
67 if (fController != NULL && !fController->EntryStarted(path)) in _RemoveEntry()
72 if (lstat(path, &st) < 0) { in _RemoveEntry()
73 return _HandleEntryError(path, errno, "Couldn't access \"%s\": %s\n", in _RemoveEntry()
74 path, strerror(errno)); in _RemoveEntry()
81 status_t error = directory.SetTo(path); in _RemoveEntry()
83 return _HandleEntryError(path, error, in _RemoveEntry()
[all …]
H A Dstorage_support.cpp30 is_absolute_path(const char *path) in is_absolute_path() argument
32 return (path && path[0] == '/'); in is_absolute_path()
186 split_path(const char *fullPath, char *&path, char *&leaf) in split_path() argument
188 return split_path(fullPath, &path, &leaf); in split_path()
200 split_path(const char *fullPath, char **path, char **leaf) in split_path() argument
202 if (path) in split_path()
203 *path = NULL; in split_path()
220 if (path) { in split_path()
221 *path = new char[2]; in split_path()
222 (*path)[0] = '/'; in split_path()
[all …]
H A DPath.cpp39 BPath::BPath(const BPath& path) in BPath() argument
44 *this = path; in BPath()
116 char path[B_PATH_NAME_LENGTH]; in SetTo() local
118 ref->name, path, sizeof(path)); in SetTo()
122 fCStatus = _SetPath(path); in SetTo()
148 BPath::SetTo(const char* path, const char* leaf, bool normalize) in SetTo() argument
150 status_t error = (path ? B_OK : B_BAD_VALUE); in SetTo()
156 normalize |= !BPrivate::Storage::is_absolute_path(path); in SetTo()
159 uint32 pathLen = strlen(path); in SetTo()
163 strcpy(newPath, path); in SetTo()
[all …]
/haiku/headers/build/
H A DBeOSBuildCompatibility.h86 int _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag);
88 int _haiku_build_fstatat(int fd, const char* path, struct stat* st,
90 int _haiku_build_mkdirat(int fd, const char* path, mode_t mode);
91 int _haiku_build_mkfifoat(int fd, const char* path, mode_t mode);
92 int _haiku_build_utimensat(int fd, const char* path,
95 int _haiku_build_faccessat(int fd, const char* path, int accessMode,
102 const char* path, int flag);
103 int _haiku_build_unlinkat(int fd, const char* path, int flag);
104 ssize_t _haiku_build_readlinkat(int fd, const char* path, char* buffer,
110 int _haiku_build_fchownat(int fd, const char* path, uid_t owner,
[all …]
/haiku/src/kits/debugger/types/
H A DArrayIndexPath.cpp35 ArrayIndexPath::SetTo(const char* path) in SetTo() argument
39 if (path == NULL) in SetTo()
42 while (*path != '\0') { in SetTo()
44 int64 index = strtoll(path, &numberEnd, 0); in SetTo()
45 if (numberEnd == path) in SetTo()
47 path = numberEnd; in SetTo()
52 if (*path == '\0') in SetTo()
55 if (*path != kIndexSeparator) in SetTo()
57 path++; in SetTo()
72 ArrayIndexPath::GetPathString(BString& path) const in GetPathString()
[all …]
/haiku/src/tools/
H A Drm_attrs.cpp18 const char* path, char* buffer);
23 bool Init(const char* path) in Init() argument
25 size_t len = strlen(path); in Init()
29 strcpy(fPath, path); in Init()
89 remove_dir_contents(Path& path, bool force, bool removeAttributes) in remove_dir_contents() argument
92 DIR* dir = opendir(path.GetPath()); in remove_dir_contents()
95 path.GetPath(), strerror(errno)); in remove_dir_contents()
106 if (!path.PushLeaf(entry->d_name)) { in remove_dir_contents()
108 "entry: \"%s\"\n", path.GetPath(), entry->d_name); in remove_dir_contents()
112 remove_entry(path, true, force, removeAttributes); in remove_dir_contents()
[all …]
/haiku/src/servers/launch/
H A DUtility.cpp24 IssueDeviceCommand(const char* path, int opcode, void* buffer, in IssueDeviceCommand() argument
28 if (fs_stat_dev(dev_for_path(path), &info) == B_OK) { in IssueDeviceCommand()
30 path = info.device_name; in IssueDeviceCommand()
33 int device = open(path, O_RDONLY); in IssueDeviceCommand()
40 fprintf(stderr, "Failed to process %d on %s: %s\n", opcode, path, in IssueDeviceCommand()
81 IsReadOnlyVolume(const char* path) in IsReadOnlyVolume() argument
83 return IsReadOnlyVolume(dev_for_path(path)); in IsReadOnlyVolume()
88 BlockMedia(const char* path, bool block) in BlockMedia() argument
90 return IssueDeviceCommand(path, B_SCSI_PREVENT_ALLOW, &block, in BlockMedia()
96 EjectMedia(const char* path) in EjectMedia() argument
[all …]
/haiku/src/kits/mail/
H A Dnumailkit.cpp31 BPath path; in default_mail_directory() local
32 if (find_directory(B_USER_DIRECTORY, &path) == B_OK) in default_mail_directory()
33 path.Append("mail"); in default_mail_directory()
35 path.SetTo("/boot/home/mail/"); in default_mail_directory()
37 return path; in default_mail_directory()
44 BPath path = default_mail_directory(); in default_mail_in_directory() local
45 path.Append("in"); in default_mail_in_directory()
47 return path; in default_mail_in_directory()
54 BPath path = default_mail_directory(); in default_mail_out_directory() local
55 path.Append("out"); in default_mail_out_directory()
[all …]
/haiku/src/tools/fs_shell/
H A Dpath_util.cpp18 get_last_path_component(const char *path, char *buffer, int bufferLen) in get_last_path_component() argument
20 int len = strlen(path); in get_last_path_component()
25 while (len > 0 && path[len - 1] == '/') in get_last_path_component()
34 while (pos > 0 && path[pos] != '/') in get_last_path_component()
36 if (path[pos] == '/') in get_last_path_component()
39 path += pos; in get_last_path_component()
46 memcpy(buffer, path, len); in get_last_path_component()
61 char *path = (char*)malloc(pathLen); in make_path() local
62 if (!path) in make_path()
66 strcpy(path, dir); in make_path()
[all …]
/haiku/src/apps/haikudepot/util/
H A DStorageUtils.cpp30 PathWithLastAccessTimestamp(const BPath path, uint64 lastAccessMillisSinceEpoch) in PathWithLastAccessTimestamp() argument
32 fPath(path), in PathWithLastAccessTimestamp()
89 StorageUtils::AppendToString(const BPath& path, BString& result) in AppendToString() argument
91 BFile file(path.Path(), O_RDONLY); in AppendToString()
103 StorageUtils::AppendToFile(const BString& input, const BPath& path) in AppendToFile() argument
105 BFile file(path.Path(), O_WRONLY | O_CREAT | O_APPEND); in AppendToFile()
115 BPath path; in RemoveWorkingDirectoryContents() local
119 result = find_directory(B_USER_CACHE_DIRECTORY, &path); in RemoveWorkingDirectoryContents()
121 result = path.Append(CACHE_DIRECTORY_APP); in RemoveWorkingDirectoryContents()
127 result = ExistsObject(path, &exists, &isDirectory, NULL); in RemoveWorkingDirectoryContents()
[all …]
H A DStorageUtils.h19 BPath& path,
22 BPath& path,
25 static status_t CheckCanWriteTo(const BPath& path);
27 static status_t AppendToString(const BPath& path, BString& result);
29 const BPath& path);
32 static status_t RemoveDirectoryContents(BPath& path);
33 static status_t RemoveDirectoryContentsRetainingLatestFiles(BPath& path,
36 static status_t ExistsObject(const BPath& path,
41 static status_t SwapExtensionOnPath(BPath& path,
47 static status_t IconTarPath(BPath& path);
[all …]
/haiku/src/tests/kits/storage/testapps/
H A DPathMonitorTest.cpp25 Looper(const char* path);
35 Looper::Looper(const char* path) in Looper() argument
37 fPath(path) in Looper()
39 status_t status = BPathMonitor::StartWatching(path, B_WATCH_ALL, this); in Looper()
41 fprintf(stderr, "Could not watch path \"%s\": %s.\n", path, strerror(status)); in Looper()
67 create_file(const char* path) in create_file() argument
69 printf("******* create file %s *******\n", path); in create_file()
71 status_t status = file.SetTo(path, B_CREATE_FILE | B_READ_WRITE); in create_file()
79 remove_file(const char* path) in remove_file() argument
81 printf("******* remove file %s *******\n", path); in remove_file()
[all …]
/haiku/src/servers/midi/
H A DDeviceWatcher.cpp154 const char* path; in MessageReceived() local
155 if (message->FindString("path", &path) != B_OK) in MessageReceived()
160 _AddDevice(path); in MessageReceived()
164 _RemoveDevice(path); in MessageReceived()
184 DeviceWatcher::_ScanDevices(const char* path) in _ScanDevices() argument
186 TRACE(("DeviceWatcher::_ScanDevices(\"%s\");\n", path)); in _ScanDevices()
188 BDirectory dir(path); in _ScanDevices()
205 DeviceWatcher::_AddDevice(const char* path) in _AddDevice() argument
207 TRACE(("DeviceWatcher::_AddDevice(\"%s\");\n", path)); in _AddDevice()
209 if (fDeviceEndpointsMap.ContainsKey(path)) { in _AddDevice()
[all …]
/haiku/src/system/boot/loader/
H A DPathBlocklist.cpp33 BlockedPath::SetTo(const char* path) in SetTo() argument
35 size_t length = strlen(path); in SetTo()
36 if (length > 0 && path[length - 1] == '/') in SetTo()
43 memcpy(fPath, path, length); in SetTo()
92 char* path; in _Resize() local
94 path = (char*)realloc(fPath, capacity); in _Resize()
95 if (path == NULL) in _Resize()
98 path = (char*)malloc(capacity); in _Resize()
99 if (path == NULL) in _Resize()
104 fPath = path; in _Resize()
[all …]
/haiku/src/servers/input/
H A DPathList.cpp22 path = strdup(_path); in path_entry()
27 free((char*)path); in ~path_entry()
30 const char* path; member
48 PathList::HasPath(const char* path, int32* _index) const in HasPath() argument
51 if (!strcmp(fPaths.ItemAt(i)->path, path)) { in HasPath()
63 PathList::AddPath(const char* path) in AddPath() argument
65 if (path == NULL) in AddPath()
69 if (HasPath(path, &index)) { in AddPath()
74 path_entry* entry = new(std::nothrow) path_entry(path); in AddPath()
75 if (entry == NULL || entry->path == NULL || !fPaths.AddItem(entry)) { in AddPath()
[all …]
/haiku/src/apps/icon-o-matic/gui/
H A DPathListView.cpp57 path(NULL), in PathListItem()
126 if (p == path) in SetPath()
129 if (path) { in SetPath()
130 path->RemoveObserver(this); in SetPath()
131 path->ReleaseReference(); in SetPath()
134 path = p; in SetPath()
136 if (path) { in SetPath()
137 path->AcquireReference(); in SetPath()
138 path->AddObserver(this); in SetPath()
146 SetText(path->Name()); in UpdateText()
[all …]
/haiku/src/tests/system/kernel/disk_device_manager/
H A DKPartitionTest.cpp22 stat(const char* path, struct stat* s) in stat() argument
24 if(strcmp(path, "/testduplicate") == 0) in stat()
69 KPath path; in TestPartitionWithoutFilesystemReturnsBadValue() local
70 status_t status = partition.GetMountPoint(&path); in TestPartitionWithoutFilesystemReturnsBadValue()
84 KPath path; in TestPartitionContentNameUsedFirst() local
85 status_t status = partition.GetMountPoint(&path); in TestPartitionContentNameUsedFirst()
88 CPPUNIT_ASSERT(strcmp(path.Path(), "/test2") == 0); in TestPartitionContentNameUsedFirst()
100 KPath path; in TestPartitionNameUsedSecond() local
101 status_t status = partition.GetMountPoint(&path); in TestPartitionNameUsedSecond()
104 CPPUNIT_ASSERT(strcmp(path.Path(), "/test1") == 0); in TestPartitionNameUsedSecond()
[all …]
/haiku/src/add-ons/kernel/file_systems/ntfs/libntfs/
H A Drealpath.c26 char *ntfs_realpath(const char *path, char *resolved_path) in ntfs_realpath() argument
28 strncpy(resolved_path, path, PATH_MAX); in ntfs_realpath()
49 char path[sizeof(name) + 16]; in canonicalize_dm_name() local
52 snprintf(path, sizeof(path), "/sys/block/%s/dm/name", ptname); in canonicalize_dm_name()
53 if (!(f = fopen(path, "r"))) in canonicalize_dm_name()
59 snprintf(path, sizeof(path), "/dev/mapper/%s", name); in canonicalize_dm_name()
60 res = strcpy(canonical, path); in canonicalize_dm_name()
83 char *ntfs_realpath_canonicalize(const char *path, char *canonical) in ntfs_realpath_canonicalize() argument
87 if (path == NULL) in ntfs_realpath_canonicalize()
90 if (!ntfs_realpath(path, canonical)) in ntfs_realpath_canonicalize()

12345678910>>...55