- Method valid_open
int(0..3)|string valid_open(string type, object current, string filename, string flags, int access)
- Parameter type
The type of file operation requested. Can either be
- Parameter current
The current object, i.e. the Fd object the user is trying to open.
- Parameter filename
The file name requested.
- Parameter flags
The flag string passed to open, e.g.
- Parameter access
The access flags requested for the file, e.g.
The function can either return a string, which means that the user is allowed to open a file, but the returned file should be opened instead, or it can return an integer. The integers are intepreted as follows.
The user was not allowed to open the file. ERRNO will be set to EPERM and an exception is thrown.
Do nothing, i.e. valid_open has initilized the current object with an open file. This can (natuarally) only be returned if a current object was given, which is not always the case.
The user was allowed to open the file and the open code proceeds.
The user was not allowed to open the file and an exception is thrown.