Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
FileStream.h File Reference
#include "Stroika/Foundation/StroikaPreComp.h"
#include "Stroika/Foundation/Common/Enumeration.h"
#include "FileStream.inl"

Go to the source code of this file.

Namespaces

namespace  Stroika::Foundation
 
namespace  Stroika::Foundation::IO::FileSystem
 

Typedefs

using Stroika::Foundation::IO::FileSystem::FileStream::FileDescriptorType = int
 

Enumerations

enum class  Stroika::Foundation::IO::FileSystem::FileStream::AdoptFDPolicy
 

Detailed Description

Note
Code-Status: Beta

Definition in file FileStream.h.

Typedef Documentation

◆ FileDescriptorType

https://en.wikipedia.org/wiki/File_descriptor

Integer value Name <unistd.h> symbolic constant[1] <stdio.h> file stream[2] 0 Standard input STDIN_FILENO stdin 1 Standard output STDOUT_FILENO stdout 2 Standard error STDERR_FILENO stderr

Definition at line 50 of file FileStream.h.

Enumeration Type Documentation

◆ AdoptFDPolicy

This only applies to File Streams constructed with an argument FileDescriptor. This controls whether the adopted file descriptor will be automatically closed when the last 'shared' reference to the stream goes out of scope.

By far the most common answer will be eCloseOnDestruction, but eDisconnectOnDestruction can be helpful when multiple streams are associated with a given file descriptor (or for predefined descriptors like stdin).

Intentionally provide no eDEFAULT, since rarely used by file descriptor, and best to be clear when doing so about the treatment on close.

Definition at line 33 of file FileStream.h.