FileSystemOperationsExtensions.SetFileExpiry Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets or removes the expiration time on the specified file. This operation can only be executed against files. Folders are not supported.
public static void SetFileExpiry (this Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations operations, string accountName, string filePath, Microsoft.Azure.Management.DataLake.Store.Models.ExpiryOptionType expiryOption, long? expireTime = default);
public static void SetFileExpiry (this Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations operations, string accountName, string path, Microsoft.Azure.Management.DataLake.Store.Models.ExpiryOptionType expiryOption, long? expireTime = default);
static member SetFileExpiry : Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations * string * string * Microsoft.Azure.Management.DataLake.Store.Models.ExpiryOptionType * Nullable<int64> -> unit
static member SetFileExpiry : Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations * string * string * Microsoft.Azure.Management.DataLake.Store.Models.ExpiryOptionType * Nullable<int64> -> unit
<Extension()>
Public Sub SetFileExpiry (operations As IFileSystemOperations, accountName As String, filePath As String, expiryOption As ExpiryOptionType, Optional expireTime As Nullable(Of Long) = Nothing)
<Extension()>
Public Sub SetFileExpiry (operations As IFileSystemOperations, accountName As String, path As String, expiryOption As ExpiryOptionType, Optional expireTime As Nullable(Of Long) = Nothing)
Parameters
- operations
- IFileSystemOperations
The operations group for this extension method.
- accountName
- String
The Azure Data Lake Store account to execute filesystem operations on.
- filePathpath
- String
The Data Lake Store path (starting with '/') of the file on which to set or remove the expiration time.
- expiryOption
- ExpiryOptionType
Indicates the type of expiration to use for the file: 1. NeverExpire: ExpireTime is ignored. 2. RelativeToNow: ExpireTime is an integer in milliseconds representing the expiration date relative to when file expiration is updated. 3. RelativeToCreationDate: ExpireTime is an integer in milliseconds representing the expiration date relative to file creation. 4. Absolute: ExpireTime is an integer in milliseconds, as a Unix timestamp relative to 1/1/1970 00:00:00. Possible values include: 'NeverExpire', 'RelativeToNow', 'RelativeToCreationDate', 'Absolute'
The time that the file will expire, corresponding to the ExpiryOption that was set.