Stay organized with collections
Save and categorize content based on your preferences.
ndk::ScopedFileDescriptor
#include <binder_auto_utils.h>
Convenience wrapper for a file descriptor.
Summary
Inheritance
Inherits from:
ndk::impl::ScopedAResource< int, internal::closeWithError,-1 >Public functions
ScopedFileDescriptor
ScopedFileDescriptor()
ScopedFileDescriptor
ScopedFileDescriptor(
int a
)
~ScopedFileDescriptor
~ScopedFileDescriptor()
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-17 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-17 UTC."],[],[],null,["# ndk::ScopedFileDescriptor Class Reference\n\nndk::ScopedFileDescriptor\n=========================\n\n\n`#include \u003cbinder_auto_utils.h\u003e`\n\nConvenience wrapper for a file descriptor.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: [ndk::impl::ScopedAResource\\\u003c int, internal::closeWithError,-1 \\\u003e](/ndk/reference/classndk/1-1impl-1-1-scoped-a-resource)\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ScopedFileDescriptor](#classndk_1_1_scoped_file_descriptor_1a5e755a1067165229465a4e60dc596f0b)`()` Takes ownership of a. ||\n| [ScopedFileDescriptor](#classndk_1_1_scoped_file_descriptor_1a90c6e905110b43bb4b1cbdf0808c9392)`(int a)` ||\n| [ScopedFileDescriptor](#classndk_1_1_scoped_file_descriptor_1a77223cf781993d9e6a521ccb34f373cb)`(`[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` &&)` ||\n| [~ScopedFileDescriptor](#classndk_1_1_scoped_file_descriptor_1a66053efcbe7e7b2a7f6c308f180c0e8e)`()` ||\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| [dup](#classndk_1_1_scoped_file_descriptor_1ae53c6aab164df1518aa430613f2f8bd8)`() const ` | [ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor) |\n| [operator!=](#classndk_1_1_scoped_file_descriptor_1adc1bec26ac691a68eaf8e9d31bded633)`(const `[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` & rhs) const ` | `bool` |\n| [operator\u003c](#classndk_1_1_scoped_file_descriptor_1ade3f217555c5f63540c9959be25a4452)`(const `[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` & rhs) const ` | `bool` |\n| [operator\u003c=](#classndk_1_1_scoped_file_descriptor_1acb25bb1876ceac6fa78bdfd109083e59)`(const `[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` & rhs) const ` | `bool` |\n| [operator=](#classndk_1_1_scoped_file_descriptor_1a05bd0967af5830cc91a197d830e3e2fd)`(`[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` &&)=default` | [ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` &` |\n| [operator==](#classndk_1_1_scoped_file_descriptor_1a9acd4613967b688b656adc34ba28dd44)`(const `[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` & rhs) const ` | `bool` |\n| [operator\u003e](#classndk_1_1_scoped_file_descriptor_1a644873f56fff72e6cd51109de3a9dec1)`(const `[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` & rhs) const ` | `bool` |\n| [operator\u003e=](#classndk_1_1_scoped_file_descriptor_1adfc1accaf8af17591222bcd4fae935be)`(const `[ScopedFileDescriptor](/ndk/reference/classndk/1-1-scoped-file-descriptor#classndk_1_1_scoped_file_descriptor)` & rhs) const ` | `bool` |\n\nPublic functions\n----------------\n\n### ScopedFileDescriptor\n\n```text\n ScopedFileDescriptor()\n``` \nTakes ownership of a. \n\n### ScopedFileDescriptor\n\n```text\n ScopedFileDescriptor(\n int a\n)\n``` \n\n### ScopedFileDescriptor\n\n```text\n ScopedFileDescriptor(\n ScopedFileDescriptor &&\n)=default\n``` \n\n### dup\n\n```gdscript\nScopedFileDescriptor dup() const \n``` \n\n### operator!=\n\n```gdscript\nbool operator!=(\n const ScopedFileDescriptor & rhs\n) const \n``` \n\n### operator\\\u003c\n\n```gdscript\nbool operator\u003c(\n const ScopedFileDescriptor & rhs\n) const \n``` \n\n### operator\\\u003c=\n\n```gdscript\nbool operator\u003c=(\n const ScopedFileDescriptor & rhs\n) const \n``` \n\n### operator=\n\n```text\nScopedFileDescriptor & operator=(\n ScopedFileDescriptor &&\n)=default\n``` \n\n### operator==\n\n```gdscript\nbool operator==(\n const ScopedFileDescriptor & rhs\n) const \n``` \n\n### operator\\\u003e\n\n```gdscript\nbool operator\u003e(\n const ScopedFileDescriptor & rhs\n) const \n``` \n\n### operator\\\u003e=\n\n```gdscript\nbool operator\u003e=(\n const ScopedFileDescriptor & rhs\n) const \n``` \n\n### \\~ScopedFileDescriptor\n\n```text\n ~ScopedFileDescriptor()\n```"]]