MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / DirectoryEntry

Method DirectoryEntry

Kernel/include/fs/filesystem.h:227–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225 mode_t flags = 0;
226
227 DirectoryEntry(FsNode* node, const char* name) {
228 this->node = node; strcpy(this->name, name);
229
230 switch(node->flags & FS_NODE_TYPE){
231 case FS_NODE_FILE:
232 flags = DT_REG;
233 break;
234 case FS_NODE_DIRECTORY:
235 flags = DT_DIR;
236 break;
237 case FS_NODE_CHARDEVICE:
238 flags = DT_CHR;
239 break;
240 case FS_NODE_BLKDEVICE:
241 flags = DT_BLK;
242 break;
243 case FS_NODE_SOCKET:
244 flags = DT_SOCK;
245 break;
246 case FS_NODE_SYMLINK:
247 flags = DT_LNK;
248 break;
249 }
250 }
251 DirectoryEntry() {}
252};
253

Callers

nothing calls this directly

Calls 1

strcpyFunction · 0.85

Tested by

no test coverage detected