IStorageFile Interface

Stellt eine Datei dar. Erstellt Informationen zur Datei und ihren Inhalten sowie zu den Möglichkeiten, um sie zu bearbeiten.

Syntax


public interface IStorageFile : IStorageItem, 
    IRandomAccessStreamReference, IInputStreamReference

Attribute

[Version(0x06020000)]

Member

Der IStorageFileSchnittstelle hat die folgenden Arten von Membern:

Methoden

The IStorageFile Schnittstelle verfügt über die folgenden Methoden. Er erbt auch Methoden von Object Klasse.

MethodeBeschreibung
CopyAndReplaceAsync Replaces the specified file with a copy of the current file.
CopyAsync(IStorageFolder) Creates a copy of the file in the specified folder.
CopyAsync(IStorageFolder, String) Creates a copy of the file in the specified folder, using the desired name.
CopyAsync(IStorageFolder, String, NameCollisionOption) Creates a copy of the file in the specified folder, using the desired name. This method also specifies what to do if an existing file in the specified folder has the same name.
MoveAndReplaceAsync Moves the current file to the location of the specified file and replaces the specified file in that location.
MoveAsync(IStorageFolder) Moves the current file to the specified folder.
MoveAsync(IStorageFolder, String) Moves the current file to the specified folder and renames the file according to the desired name.
MoveAsync(IStorageFolder, String, NameCollisionOption) Moves the current file to the specified folder and renames the file according to the desired name. This method also specifies what to do if a file with the same name already exists in the specified folder.
OpenAsync Opens a random-access stream over the file.
OpenTransactedWriteAsync Opens a transacted, random-access stream to the file.

 

Eigenschaften

IStorageFileSchnittstelle hat die folgenden Eigenschaften.

EigenschaftZugriffstypBeschreibung

ContentType

SchreibgeschütztGets the MIME type of the contents of the file.

FileType

SchreibgeschütztGets the type (file name extension) of the file.

 

Anmerkungen

Schnittstellenvererbung

IStorageFile erbt IInputStreamReference, IRandomAccessStreamReference und IStorageItem. Typen, die IStorageFile implementieren, implementieren auch die Schnittstellenmember von IInputStreamReference, IRandomAccessStreamReference und IStorageItem.

Anforderungen

Unterstützte Mindestversion (Client)

Windows 8

Unterstützte Mindestversion (Server)

Windows Server 2012

Unterstützte Mindestversion (Telefon)

Windows Phone 8

Namespace

Windows.Storage
Windows::Storage [C++]

Metadaten

Windows.winmd

Capabilities

picturesLibrary
videosLibrary
musicLibrary
documentsLibrary

Weitere Informationen

IInputStreamReference
IRandomAccessStreamReference
IStorageItem

 

 

Anzeigen:
© 2014 Microsoft