Class FileUtil
Provides meta real and temporary file utility method.
Inheritance
System.Object
FileUtil
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.BusinessFoundation.Data.Meta
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 12.17.2Syntax
public static class FileUtil
Methods
CleanUp()
Cleans the up.
Declaration
public static void CleanUp()
CreateFileInfoFromTemporaryFile(Guid)
Creates the file info.
Declaration
public static FileInfo CreateFileInfoFromTemporaryFile(Guid FileUID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | FileUID | The file UID. |
Returns
Type | Description |
---|---|
FileInfo |
CreateTemporaryFile(String, Stream)
Creates the specified file name.
Declaration
public static Guid CreateTemporaryFile(string FileName, Stream inputStream)
Parameters
Type | Name | Description |
---|---|---|
System.String | FileName | Name of the file. |
System.IO.Stream | inputStream | The input stream. |
Returns
Type | Description |
---|---|
System.Guid |
DeleteTemporaryFile(Guid)
Deletes the specified file UID.
Declaration
public static void DeleteTemporaryFile(Guid FileUID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | FileUID | The file UID. |
GetContentType(Guid)
Gets the type of the content.
Declaration
public static string GetContentType(Guid FileUID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | FileUID | The file UID. |
Returns
Type | Description |
---|---|
System.String |
GetFileName(Guid)
Gets the name of the file.
Declaration
public static string GetFileName(Guid FileUID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | FileUID | The file UID. |
Returns
Type | Description |
---|---|
System.String |
IsTemporary(Guid)
Determines whether the specified file UID is temporary.
Declaration
public static bool IsTemporary(Guid FileUID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | FileUID | The file UID. |
Returns
Type | Description |
---|---|
System.Boolean |
|
OpenRead(Guid)
Opens the read.
Declaration
public static Stream OpenRead(Guid FileUID)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | FileUID | The file UID. |
Returns
Type | Description |
---|---|
System.IO.Stream |