Dropbox .NET SDK
Show / Hide Table of Contents

Class FileMetadata

The file metadata object

Inheritance
object
Metadata
FileMetadata
Inherited Members
Metadata.IsFile
Metadata.AsFile
Metadata.IsFolder
Metadata.AsFolder
Metadata.IsDeleted
Metadata.AsDeleted
Metadata.Name
Metadata.PathLower
Metadata.PathDisplay
Metadata.ParentSharedFolderId
Metadata.PreviewUrl
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Dropbox.Api.Files
Assembly: Dropbox.Api.dll
Syntax
public class FileMetadata : Metadata

Constructors

View Source

FileMetadata(string, string, DateTime, DateTime, string, ulong, string, string, string, string, MediaInfo, SymlinkInfo, FileSharingInfo, bool, ExportInfo, IEnumerable<PropertyGroup>, bool?, string, FileLockMetadata, bool?)

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, bool? isRestorable = null)
Parameters
Type Name Description
string name

The last component of the path (including extension). This never contains a slash.

string id

A unique identifier for the file.

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.

DateTime serverModified

The last time the file was modified on Dropbox.

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.

ulong size

The file size in bytes.

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.

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.

string parentSharedFolderId

Field is deprecated. Please use ParentSharedFolderId or ParentSharedFolderId instead.

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.

bool 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 isDownloadable is set to false.

IEnumerable<PropertyGroup> propertyGroups

Additional information if the file has custom properties with the property template specified.

bool? 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.

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.

bool? isRestorable

If present, indicates whether this file revision can be restored.

Properties

View Source

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.

Declaration
public DateTime ClientModified { get; protected set; }
Property Value
Type Description
DateTime
View Source

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
string
View Source

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
View Source

FileLockInfo

If present, the metadata associated with the file's current lock.

Declaration
public FileLockMetadata FileLockInfo { get; protected set; }
Property Value
Type Description
FileLockMetadata
View Source

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
bool?
View Source

Id

A unique identifier for the file.

Declaration
public string Id { get; protected set; }
Property Value
Type Description
string
View Source

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
bool
View Source

IsRestorable

If present, indicates whether this file revision can be restored.

Declaration
public bool? IsRestorable { get; protected set; }
Property Value
Type Description
bool?
View Source

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
View Source

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
IList<PropertyGroup>
View Source

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
string
View Source

ServerModified

The last time the file was modified on Dropbox.

Declaration
public DateTime ServerModified { get; protected set; }
Property Value
Type Description
DateTime
View Source

SharingInfo

Set if this file is contained in a shared folder.

Declaration
public FileSharingInfo SharingInfo { get; protected set; }
Property Value
Type Description
FileSharingInfo
View Source

Size

The file size in bytes.

Declaration
public ulong Size { get; protected set; }
Property Value
Type Description
ulong
View Source

SymlinkInfo

Set if this file is a symlink.

Declaration
public SymlinkInfo SymlinkInfo { get; protected set; }
Property Value
Type Description
SymlinkInfo

See Also

ExportResult
GetTemporaryLinkResult
GetThumbnailBatchResultData
  • View Source
In this article
Back to top Dropbox .NET SDK