Class FileMetadata
The file metadata object
Inherited Members
Namespace: Dropbox.Api.Files
Assembly: Dropbox.Api.dll
Syntax
public class FileMetadata : Metadata
Constructors
| Improve this Doc View SourceFileMetadata(String, String, DateTime, DateTime, String, UInt64, String, String, String, String, MediaInfo, SymlinkInfo, FileSharingInfo, Boolean, ExportInfo, IEnumerable<PropertyGroup>, Nullable<Boolean>, String, FileLockMetadata)
Initializes a new instance of the FileMetadata class.
Declaration
public FileMetadata(string name, string id, DateTime clientModified, DateTime serverModified, string rev, ulong size, string pathLower = null, string pathDisplay = null, string parentSharedFolderId = null, string previewUrl = null, MediaInfo mediaInfo = null, SymlinkInfo symlinkInfo = null, FileSharingInfo sharingInfo = null, bool isDownloadable = true, ExportInfo exportInfo = null, IEnumerable<PropertyGroup> propertyGroups = null, bool? hasExplicitSharedMembers = null, string contentHash = null, FileLockMetadata fileLockInfo = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The last component of the path (including extension). This never contains a slash. |
System.String | id | A unique identifier for the file. |
System.DateTime | clientModified | For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not. |
System.DateTime | serverModified | The last time the file was modified on Dropbox. |
System.String | rev | A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts. |
System.UInt64 | size | The file size in bytes. |
System.String | pathLower | The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted. |
System.String | pathDisplay | The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg). This field will be null if the file or folder is not mounted. |
System.String | parentSharedFolderId | Please use ParentSharedFolderId or ParentSharedFolderId instead. |
System.String | previewUrl | The preview URL of the file. |
MediaInfo | mediaInfo | Additional information if the file is a photo or video. This field will not be set on entries returned by ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg), ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg), or GetThumbnailBatchAsync(GetThumbnailBatchArg), starting December 2, 2019. |
SymlinkInfo | symlinkInfo | Set if this file is a symlink. |
FileSharingInfo | sharingInfo | Set if this file is contained in a shared folder. |
System.Boolean | isDownloadable | If true, file can be downloaded directly; else the file must be exported. |
ExportInfo | exportInfo | Information about format this file can be exported to.
This filed must be set if |
System.Collections.Generic.IEnumerable<PropertyGroup> | propertyGroups | Additional information if the file has custom properties with the property template specified. |
System.Nullable<System.Boolean> | hasExplicitSharedMembers | This flag will only be present if include_has_explicit_shared_members is true in ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or GetMetadataAsync(GetMetadataArg). If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder. |
System.String | contentHash | A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash page. |
FileLockMetadata | fileLockInfo | If present, the metadata associated with the file's current lock. |
Properties
| Improve this Doc View SourceClientModified
For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.
Declaration
public DateTime ClientModified { get; protected set; }
Property Value
Type | Description |
---|---|
System.DateTime |
ContentHash
A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash page.
Declaration
public string ContentHash { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
ExportInfo
Information about format this file can be exported to. This filed must be set if IsDownloadable is set to false.
Declaration
public ExportInfo ExportInfo { get; protected set; }
Property Value
Type | Description |
---|---|
ExportInfo |
FileLockInfo
If present, the metadata associated with the file's current lock.
Declaration
public FileLockMetadata FileLockInfo { get; protected set; }
Property Value
Type | Description |
---|---|
FileLockMetadata |
HasExplicitSharedMembers
This flag will only be present if include_has_explicit_shared_members is true in ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg) or GetMetadataAsync(GetMetadataArg). If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder.
Declaration
public bool? HasExplicitSharedMembers { get; protected set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Id
A unique identifier for the file.
Declaration
public string Id { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
IsDownloadable
If true, file can be downloaded directly; else the file must be exported.
Declaration
public bool IsDownloadable { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MediaInfo
Additional information if the file is a photo or video. This field will not be set on entries returned by ListFolderAsync(ListFolderArg) ListFolderAsync(ListFolderArg), ListFolderContinueAsync(ListFolderContinueArg) ListFolderContinueAsync(ListFolderContinueArg), or GetThumbnailBatchAsync(GetThumbnailBatchArg), starting December 2, 2019.
Declaration
public MediaInfo MediaInfo { get; protected set; }
Property Value
Type | Description |
---|---|
MediaInfo |
PropertyGroups
Additional information if the file has custom properties with the property template specified.
Declaration
public IList<PropertyGroup> PropertyGroups { get; protected set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<PropertyGroup> |
Rev
A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.
Declaration
public string Rev { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
ServerModified
The last time the file was modified on Dropbox.
Declaration
public DateTime ServerModified { get; protected set; }
Property Value
Type | Description |
---|---|
System.DateTime |
SharingInfo
Set if this file is contained in a shared folder.
Declaration
public FileSharingInfo SharingInfo { get; protected set; }
Property Value
Type | Description |
---|---|
FileSharingInfo |
Size
The file size in bytes.
Declaration
public ulong Size { get; protected set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
SymlinkInfo
Set if this file is a symlink.
Declaration
public SymlinkInfo SymlinkInfo { get; protected set; }
Property Value
Type | Description |
---|---|
SymlinkInfo |