Files Class

Class for file management methods.

Definition

Namespace: Aliquo.Core
Assembly: Aliquo.Core (in Aliquo.Core.dll) Version: 5.0.9179.22651
C#
public class Files
Inheritance
Object    Files

Constructors

FilesInitializes a new instance of the Files class

Methods

CopyDirectory Copy all content from one site to another, including any subfolders it contains.
CopyFiles Copy all contents of directory to another.
CreateDirectory It checks that the route exists, if not it creates it and returns the route again.
DeleteDirectory Delete the directory and all its contents.
ExistPath It checks that the route exists and has the option to create it, if not it exists.
FilesFromDictionaryBytes Creates files from a collection of files and bytes
FilesToDictionaryBytes Reads the contents of files from a path into a collection of files and bytes.
FromBytes Create a file from a byte array.
GetBlocksCount(Int64, Int32) Obtains the number of blocks based on the length and size of each block.
GetBlocksCount(String, Int32) Gets the number of blocks based on the length of a file and the size of each block.
GetFileInfo Get file info into a model of FileInfo.
GetLengthBlockDefault Get the length in bytes of the default block.
InvalidFileNameChars Indicates whether the file name contains illegal characters.
InvalidPathChars Indicates whether the path contains illegal characters.
IsEqualBasicInfo(String, String) Indicates whether the basic information of the modification date and length is the same.
IsEqualBasicInfo(String, DateTime, Int64) Indicates whether the basic information of the modification date and length is the same.
PathCheck Check that the route exists and if not, create it.
ReadBlock Read a block of bytes from the file.
RemoveAttibuteTemporary Remove attribute in current attributes file.
ReplaceInvalidFileNameChars Replaces illegal characters in the file name with the specified character.
ReplaceInvalidPathChars Replaces illegal characters in the path with a correct character.
SetAttibuteTemporary Set attribute in current attributes file.
SizeConvert Converts the length in bytes into the indicated unit based on the exponent (1 - KB, 2 - MB, 3 - GB, ...).
SizeInMegabytes(Int64) Determines the length in bytes of the file in Megabytes (Mb).
SizeInMegabytes(String) Determines the length of the file in Megabytes (Mb).
SizeToString Converts the length in bytes of the file to text.
ToBytes Read the contents of a file into a byte array.
WriteBlock Write a block of bytes to the file.
WriteLog(String) Logs a message to the log file specified in [LogFilePath] of Windows registry
WriteLog(String, String) Log a message in the indicated log file.

Extension Methods

GetAttributeFromT Get attribute from a class.
(Defined by ObjectExtensions)
ValidateDataAnnotations Validate class with validator of DataAnnotations.
(Defined by ObjectExtensions)

See Also