import { BufferView } from 'utilium/buffer.js'; import type { V_Context } from '../context.js'; import { Inode } from '../internal/inode.js'; declare const fsxattr_base: import("memium").StructConstructor>; declare class fsxattr extends fsxattr_base { /** xflags field value */ accessor xflags: number; /** extsize field value */ accessor extsize: number; /** nextents field value */ accessor nextents: number; /** project identifier */ accessor projid: number; /** CoW extsize field value */ accessor cowextsize: number; protected accessor pad: number[]; constructor(inode?: Inode); } /** * `FS_IOC_*` commands for {@link ioctl | `ioctl`} * @remarks * These are computed from a script since constant values are needed for enum member types */ export declare enum IOC { GetFlags = 2148034049, SetFlags = 1074292226, GetVersion = 2148038145, SetVersion = 1074296322, Fiemap = 3223348747, GetXattr = 2149341215, SetXattr = 1075599392, GetLabel = 2164298801, SetLabel = 1090556978, GetUUID = 2148603136, GetSysfsPath = 2155943169 } /** * `FS_IOC32_*` commands for {@link ioctl | `ioctl`} * @remarks * These are computed from a script since constant values are needed for enum member types */ export declare enum IOC32 { GetFlags = 2147771905, SetFlags = 1074030082, GetVersion = 2147776001, SetVersion = 1074034178 } /** Used by `ioctl` for type inference */ interface _ioc_ops { [IOC.GetFlags](): number; [IOC.SetFlags](flags: number): void; [IOC.GetVersion](): number; [IOC.SetVersion](version: number): void; [IOC.Fiemap](): never; [IOC.GetXattr](name: string): fsxattr; [IOC.SetXattr](name: string, value: fsxattr): never; [IOC.GetLabel](): string; [IOC.SetLabel](label: string): void; [IOC.GetUUID](): string; [IOC.GetSysfsPath](): string; } /** Used by `ioctl` for type inference */ interface _ioc32_ops extends Record any> { [IOC32.GetFlags](): number; [IOC32.SetFlags](flags: number): void; [IOC32.GetVersion](): number; [IOC32.SetVersion](version: number): void; } /** Used by `ioctl` for type inference */ type __ioctl_args__ = T extends IOC ? Parameters<_ioc_ops[T]> : T extends IOC32 ? Parameters<_ioc32_ops[T]> : any[]; /** Used by `ioctl` for type inference */ type __ioctl_return__ = T extends IOC ? ReturnType<_ioc_ops[T]> : T extends IOC32 ? ReturnType<_ioc32_ops[T]> : any; /** Perform an `ioctl` on a file or file system. */ export declare function ioctl, const Return extends __ioctl_return__>(this: V_Context, /** The path to the file or file system to perform the `ioctl` on */ path: string, /** The command to perform (uint32) */ command: Command, /** The arguments to pass to the command */ ...args: Args): Promise; /** Perform an `ioctl` on a file or file system */ export declare function ioctlSync, const Return extends __ioctl_return__>(this: V_Context, /** The path to the file or file system to perform the `ioctl` on */ path: string, /** The command to perform (uint32) */ command: Command, /** The arguments to pass to the command */ ...args: Args): Return; export {};