Sdílet prostřednictvím


FileProperties Class

File properties class.

Constructor

FileProperties(**kwargs: Any)

Methods

get
has_key
items
keys
update
values

get

get(key, default=None)

Parameters

Name Description
key
Required
default
Required
Default value: None

has_key

has_key(k)

Parameters

Name Description
k
Required

items

items()

keys

keys()

update

update(*args, **kwargs)

values

values()

Attributes

acl

The POSIX ACL permissions of the file or directory.

acl: str | None = None

content_settings

Stores all the content settings for the file.

content_settings: ContentSettings

creation_time

A datetime object representing when the file was created, in UTC.

creation_time: datetime

deleted

Whether the currently file is mark as deleted.

deleted: bool | None

deleted_time

A datetime object representing when the file was deleted, in UTC.

deleted_time: datetime | None = None

encryption_context

Specifies the encryption context to set on the file.

encryption_context: str | None = None

encryption_scope

A predefined encryption scope used to encrypt the data on the service. An encryption scope can be created using the Management API and referenced here by name. If a default encryption scope has been defined at the file system, this value will override it if the file system level scope is configured to allow overrides. Otherwise an error will be raised.

encryption_scope: str | None = None

etag

The ETag contains a value that you can use to perform operations conditionally.

etag: str

expiry_time

A datetime object representing when the file's immutability policy is set to expire.

expiry_time: datetime | None = None

group

The owning group of the file or directory.

group: str | None = None

last_modified

A datetime object representing the last time the file was modified.

last_modified: datetime

lease

Stores all the lease information for the file.

lease: LeaseProperties

metadata

Name-value pairs associated with the file as metadata.

metadata: Dict[str, str]

name

The name of the file.

name: str

owner

The owner of the file or directory.

owner: str | None = None

permissions

The permissions that are set for user, group, and other on the file or directory. Each individual permission is in [r,w,x,-]{3} format.

permissions: str | None = None

remaining_retention_days

The number of days that the file will be retained before being permanently deleted by the service.

remaining_retention_days: int | None = None

size

The size of the file.

size: int