Discuss this help topic in SecureBlackbox Forum

TElSftpFileAttributes.AllocationSize

TElSftpFileAttributes     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Specifies the number of bytes that the file consumes on disk

Declaration

[C#]
    long AllocationSize;

[VB.NET]
    Property AllocationSize As Long

[Pascal]
    property AllocationSize : Int64;

[C++]
    int64_t get_AllocationSize();
    void set_AllocationSize(int64_t Value);

[PHP]
    integer get_AllocationSize()
    void set_AllocationSize(integer $Value)

[Java]
    long getAllocationSize();
    void setAllocationSize(long Value);

Description

    This property specifies the number of bytes that the file consumes on disk. Its value may be less than the Size if the file is 'sparse'.     The following paragraph is taken from SSH File Transfer Protocol draft-ietf-secsh-filexfer-10, part 7.4:

    « When present during file creation, the file SHOULD be created and the specified number of bytes preallocated. If the preallocation fails, the file should be removed (if it was created) and an error returned.

     If this field is present during a setstat operation, the file SHOULD be extended or truncated to the specified size. The 'size' of the file may be affected by this operation. If the operation succeeds, the 'size' should be the minimum of the 'size' before the operation and the new 'allocation-size'.

     Querying the 'allocation-size' after setting it MUST return a value that is greater-than or equal to the value set, but it MAY not return the precise value set.

     If both 'size' and 'allocation-size' are set during a setstat operation, and 'allocation-size' is less than 'size', the server MUST return SSH_FX_INVALID_PARAMETER. »


See also:     Size    

Discuss this help topic in SecureBlackbox Forum