
Namespace System
Namespace IO

Enum SeekOrigin
	Begin = FILE_BEGIN
	Current = FILE_CURRENT
	End = FILE_END
End Enum

Enum SearchOption
	AllDirectories
	TopDirectoryOnly
End Enum

/*
@brief ファイルのアクセス方法を表す
*/
Enum FileAccess
	Read      = GENERIC_READ
	ReadWrite = GENERIC_READ Or GENERIC_WRITE
	Write     = GENERIC_WRITE
End Enum

/*
@brief ファイルの属性を表す
*/
Enum FileAttributes
	Archive           = FILE_ATTRIBUTE_ARCHIVE
	Compressed        = FILE_ATTRIBUTE_COMPRESSED
	Device            = FILE_ATTRIBUTE_DEVICE
	Directory         = FILE_ATTRIBUTE_DIRECTORY
	Encrypted         = FILE_ATTRIBUTE_ENCRYPTED
	Hidden            = FILE_ATTRIBUTE_HIDDEN
	Normal            = FILE_ATTRIBUTE_NORMAL
	NotContentIndexed = FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
	Offline           = FILE_ATTRIBUTE_OFFLINE
	ReadOnly          = FILE_ATTRIBUTE_READONLY
	ReparsePoint      = FILE_ATTRIBUTE_REPARSE_POINT
	SparseFile        = FILE_ATTRIBUTE_SPARSE_FILE
	System            = FILE_ATTRIBUTE_SYSTEM
	Temporary         = FILE_ATTRIBUTE_TEMPORARY
End Enum

/*
@brief ファイルの作成モードを表す
*/
Enum FileMode
	Append       = -1
	Create       = CREATE_ALWAYS
	CreateNew    = CREATE_NEW
	Open         = OPEN_EXISTING
	OpenOrCreate = OPEN_ALWAYS
	Truncate     = TRUNCATE_EXISTING
End Enum

/*
@brief ファイルの共有を表す
*/
Enum FileShare
	None       = 0
	Read       = FILE_SHARE_READ
	Write      = FILE_SHARE_WRITE
	ReadWrite  = FILE_SHARE_READ Or FILE_SHARE_WRITE
	DeleteFile = FILE_SHARE_DELETE
	Inheritable = &h10
End Enum

Enum FileOptions
	None = 0
	Asynchronous = FILE_FLAG_OVERLAPPED
	DeleteOnClose = FILE_FLAG_DELETE_ON_CLOSE
	Encrypted = FILE_ATTRIBUTE_ENCRYPTED
	RandomAccess = FILE_FLAG_RANDOM_ACCESS
	SequentialScan = FILE_FLAG_SEQUENTIAL_SCAN
	WriteThrough = FILE_FLAG_WRITE_THROUGH
End Enum

End Namespace 'IO
End Namespace 'System
