Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.SFTP.Version3Types

Feature notes: SFTP implementation notes

Classes, interfaces and records

interfaceiFileAttributes3

inherits from iFileAttributes

function GetAccessTime: UInt32;
Backs AccessTime; apps normally read the property, not this accessor.
function GetGid: UInt32;
Backs Gid; apps normally read the property, not this accessor.
function GetModifyTime: UInt32;
Backs ModifyTime; apps normally read the property, not this accessor.
function GetUid: UInt32;
Backs Uid; apps normally read the property, not this accessor.
function GetValidAttributeFlags: tValidFileAttrFlags3;
Backs ValidAttributeFlags; apps normally read the property.
function GetExtended: TStrings;
Backs Extended; apps normally read the property, not this accessor.
procedure SetAccessTime(const Value: UInt32);
Backs AccessTime; also switches vf3AcModTime on in the valid-flags.
procedure SetGid(const Value: UInt32);
Backs Gid; also switches vf3UidGid on in the valid-flags.
procedure SetModifyTime(const Value: UInt32);
Backs ModifyTime; also switches vf3AcModTime on in the valid-flags.
procedure SetUid(const Value: UInt32);
Backs Uid; also switches vf3UidGid on in the valid-flags.
procedure SetValidAttributeFlags(const Value: tValidFileAttrFlags3);
Backs ValidAttributeFlags; replaces the mask without touching stored field values.
procedure SetExtended(const Value: TStrings);
Backs Extended; copies the list and switches vf3Extended on.
property ValidAttributeFlags: tValidFileAttrFlags3 read GetValidAttributeFlags write SetValidAttributeFlags;
Presence bitmask telling which of the optional v3 fields are actually carried. After a server STAT/FSTAT/READDIR reply an app should test this before trusting Size, Uid, Gid, Permissions or the times; when composing attributes for SETSTAT/OPEN it names the fields to apply. The individual property setters keep this in sync automatically.
property Uid: UInt32 read GetUid write SetUid;
Numeric POSIX owner user-id; meaningful only when vf3UidGid is present. Protocol version 3 carries raw numeric ids (later SFTP versions use owner-name strings instead). Assigning marks vf3UidGid present.
property Gid: UInt32 read GetGid write SetGid;
Numeric POSIX group-id; like Uid it is a raw number, valid only with vf3UidGid, and assigning marks that flag present.
property AccessTime: UInt32 read GetAccessTime write SetAccessTime;
Last-access time in whole seconds since the Unix epoch, valid only with vf3AcModTime. A client assigns it to request a timestamp change via SETSTAT/FSETSTAT; a server reports the file's atime in STAT/READDIR. Assigning marks vf3AcModTime present.
property ModifyTime: UInt32 read GetModifyTime write SetModifyTime;
Last-modification time in whole seconds since the Unix epoch; the companion of AccessTime and sharing the same vf3AcModTime flag (v3 has no separate modify-time flag). Assigning marks that flag present.
property Extended: TStrings read GetExtended write SetExtended;
Vendor/type-specific extension attributes as a name-then-value TStrings pair list, present only with vf3Extended and rarely touched by ordinary apps. Assigning copies the list and marks the flag.

classtFileAttributes3

constructor Create;
Concrete v3 implementation behind iFileAttributes3. The constructor allocates the backing Extended list, so an app that needs a blank attribute set to populate before an OPEN/SETSTAT can create one here (though most code receives the interface ready-made from the SFTP layer).
destructor Destroy; override;
Releases the backing Extended list; called via reference counting when the last interface reference is dropped.

Types (enumerations, sets, aliases)

enumtValidFileAttr3

  tValidFileAttr3 = (
    vf3Size,
    vf3UidGid,
    vf3Permissions,
    vf3ACModTime,
    vf3x04,
    vf3x05,
    vf3x06,
    vf3x07,
    vf3x08,
    vf3x09,
    vf3x0A,
    vf3x0B,
    vf3x0C,
    vf3x0D,
    vf3x0E,
    vf3x0F,
    vf3x10,
    vf3x11,
    vf3x12,
    vf3x13,
    vf3x14,
    vf3x15,
    vf3x16,
    vf3x17,
    vf3x18,
    vf3x19,
    vf3x1A,
    vf3x1B,
    vf3x1C,
    vf3x1D,
    vf3x1E,
    vf3Extended
  );

settValidFileAttrFlags3

  tValidFileAttrFlags3 = set of tValidFileAttr3;

enumtFileOpenFlag3

  tFileOpenFlag3 = (
    fo3Read,
    fo3Write,
    fo3Append,
    fo3Create,
    fo3Truncate,
    fo3Exclusive
  );

settFileOpenFlags3

  tFileOpenFlags3 = set of tFileOpenFlag3;