Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The FileType property retrieves the type of a content file identified by a specific path.
WMS_FILE_TYPE = Server.get_FileType(
string strpath
);
Property Value
A member of a WMS_FILE_TYPEenumeration type. This must be one of the following values.
Value |
Description |
|---|---|
WMS_FILE_DIRECTORY |
The item is a directory. |
WMS_FILE_MEDIA |
The item is a digital media file. |
WMS_FILE_PLAYLIST |
The item is a playlist. |
WMS_FILE_STREAM_FORMAT |
The item is a stream format file. |
WMS_FILE_UNSPECIFIED |
The file type is either unknown or unspecified. |
If this property fails, it throws an exception.
Number |
Description |
|---|---|
0x8007000E |
There is insufficient memory to complete the function. |
Arguments
path |
[in] string containing the path. |
Remarks
This property is read-only.
This method requires the Network Service account to have read and browse access to the specified path.
Example
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
string strText;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the file type for the specified file.
strText = "c:\\wmpub\\wmroot\\welcome1.asf";
WMS_FILE_TYPE ftType;
ftType = Server.get_FileType(strText);
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.