Packagecom.adobe.flascc.vfs
Interfacepublic interface ISpecialFile
Implementors Console

This interface is used by the VFS for special files that must be implemented via code rather than a fixed ByteArray. The default Console implementation uses the ISpecialFile interface to handle read/write requests to /dev/tty which corresponds with C/C++ code reading/writting to stdin/stdout. You might also use this interface to implement other special files like "/dev/null" or "/dev/random".



Public Methods
 MethodDefined By
  
fcntl(fileDescriptor:int, cmd:int, data:int, errnoPtr:int):int
This matches the signature of fcntl from the IKernel interface.
ISpecialFile
  
ioctl(fileDescriptor:int, request:int, data:int, errnoPtr:int):int
This matches the signature of ioctl from the IKernel interface.
ISpecialFile
  
read(fileDescriptor:int, bufPtr:int, nbyte:int, errnoPtr:int):int
This matches the signature of read from the IKernel interface.
ISpecialFile
  
write(fileDescriptor:int, bufPtr:int, nbyte:int, errnoPtr:int):int
This matches the signature of write from the IKernel interface.
ISpecialFile
Method Detail
fcntl()method
public function fcntl(fileDescriptor:int, cmd:int, data:int, errnoPtr:int):int

This matches the signature of fcntl from the IKernel interface.

Parameters

fileDescriptor:int — The file descriptor being manipulated
 
cmd:int — An fcntl command
 
data:int — An argument for the given command
 
errnoPtr:int — A pointer to the location of the errno global variable

Returns
int — an integer indicating the success or failure of the syscall, see the BSD documentation for expected values
ioctl()method 
public function ioctl(fileDescriptor:int, request:int, data:int, errnoPtr:int):int

This matches the signature of ioctl from the IKernel interface.

Parameters

fileDescriptor:int — The file descriptor being manipulated
 
request:int — An ioctl request
 
data:int — An argument for the given command
 
errnoPtr:int — A pointer to the location of the errno global variable

Returns
int — an integer indicating the success or failure of the syscall, see the BSD documentation for expected values
read()method 
public function read(fileDescriptor:int, bufPtr:int, nbyte:int, errnoPtr:int):int

This matches the signature of read from the IKernel interface.

Parameters

fileDescriptor:int — The file descriptor being read from
 
bufPtr:int — A Pointer to the buffer you are expected to fill with data for this read.
 
nbyte:int — The size of the buffer pointed to by bufPtr
 
errnoPtr:int — A pointer to the location of the errno global variable

Returns
int — an integer indicating the success or failure of the syscall, see the BSD documentation for expected values
write()method 
public function write(fileDescriptor:int, bufPtr:int, nbyte:int, errnoPtr:int):int

This matches the signature of write from the IKernel interface.

Parameters

fileDescriptor:int — The file descriptor being written to
 
bufPtr:int — A Pointer to the buffer containing data to be written to this file descriptor.
 
nbyte:int — The size of the buffer pointed to by bufPtr
 
errnoPtr:int — A pointer to the location of the errno global variable

Returns
int — an integer indicating the success or failure of the syscall, see the BSD documentation for expected values