2016-05-31 22:29 GMT+02:00 Al Viro <viro@xxxxxxxxxxxxxxxxxx>: > All of the above applies to directories. Well, almost - you get getdents(2) > instead of read(2) and no analogue of write(2). The notion of the current > IO position, desciptor vs. opened file distinction, difference between > open() + dup() and open() + open() - all of that is identical to the situation > with regular files. > > "struct file" is a fairly common name for the structure representing an > opened file (regardless of the file type). On all kind of Unices, Linux > included... I understand that a directory is simular to a file, and the struct file also applies to a directory. Thanks a lot for your detailed explanation! When does a lseek not affect another? Does this depend on how the filesystem deals with a directory right? How is it stored? When a directory is nothing more than a linked list, where new entries are appended at the end, seeking through the linked list will not get mixed up compared to using another method, like I use skiplists (and only that) for directories. Stef -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html