class::sys::NullFile

class sys::NullFile
  : public sys::File

Methods

  • public inlineNullFile()
  • public inline intclose()
  • public inline intflags() const
  • public inline intioctl(int req,void * arg) const
  • public intopen(constvar::ConstString& name,int flags)
  • public intread(void * buf,int nbyte) const
  • public inline intread()
  • public intread()
  • public inline intread()
  • public inline intread()
  • public intread()
  • public inline intread()
  • public intseek(int loc,int whence) const
  • public inline voidset_flags(int o_flags)
  • public inline u32size() const
  • public intwrite(const void * buf,int nbyte) const
  • public intwrite()
  • public inline intwrite()
  • public inline intwrite()
  • public inline intwrite()
  • public intwrite()
  • public inline intwrite()
  • public inline intwrite()
  • public inline intwrite()
  • public inline intwrite()
  • public inline intwrite()
  • public intwrite()
  • public inline intwrite()
  • public inline intwrite()
  • public intwrite()

Details

public inlineNullFile()

Constructs a null file.


public inline intclose()

Reimplements sys::File::close() to have no functionality.


public inline intflags() const

public inline intioctl(int req,void * arg) const

Reimplements sys::File::ioctl() to have no functionality.


public intopen(constvar::ConstString& name,int flags)

Reimplements sys::File::open() to have no functionality.


public intread(void * buf,int nbyte) const

Reimplements sys::File::read() to simply return -1 if a read is attempted.

Parameters

  • buf dest data pointer

  • nbyte number of bytes to read

Returns

-1 to indicate reads are not valid


public inline intread()

public intread()

Reads the file.

Parameters

  • buf A pointer to the destination buffer

  • nbyte The number of bytes to read

Returns

The number of bytes read or less than zero on an error


public inline intread()

Reads the file into a var::Data object.

Parameters

  • data The destination data object

Returns

The number of bytes read

This method will read up to data.size() bytes.


public inline intread()

public intread()

Reads the file.

Parameters

  • loc The location of the file to read

  • buf A pointer to the destination buffer

  • nbyte The number of bytes to read

Returns

The number of bytes read or less than zero on an error


public inline intread()

Reads the file using a var::Data object.


public intseek(int loc,int whence) const

Returns an error.

Parameters

  • loc The location to seek to

  • whence The location to seek from (e.g. sys::File::SET)

Returns

-1 because seeking is not valid


public inline voidset_flags(int o_flags)

public inline u32size() const

Returns zero.


public intwrite(const void * buf,int nbyte) const

Reimplements sys::File::write() to simply to accept the data but it is not stored anywhere.

Parameters

  • buf source data pointer

  • nbyte number of bytes to write

Returns

The number of bytes successfully written


public intwrite()

Writes the file at the location specified.

Parameters

  • loc Location to write (not application to character devices)

  • buf Pointer to the source data

  • nbyte Number of bytes to write

Returns

Number of bytes successfully written or less than zero with errno set


public inline intwrite()

public inline intwrite()

public inline intwrite()

Writes the file using a var::Data object at the location specified.


public intwrite()

public inline intwrite()

Writes the file using a var::String object at the location specified.


public inline intwrite()

public inline intwrite()

Writes the file using a var::ConstString object at the location specified.


public inline intwrite()

public inline intwrite()

Writes a var::String to the file.

Parameters

  • str The string to write

Returns

The number of bytes written


public intwrite()

Write the file.

Parameters

  • buf A pointer to the source buffer

  • nbyte The number of bytes to read

Returns

The number of bytes written or less than zero on an error


public inline intwrite()

Writes the file using a var::Data object.


public inline intwrite()

Writes a var::ConstString to the file.

Parameters

  • str The string to write

Returns

The number of bytes written


public intwrite()

X

Thanks for Coming!

Subscribe to news and updates