---
--- Generated by MLN Team (https://www.immomo.com)
--- Created by MLN Team.
--- DateTime: 15-01-2020 17:35
---

---
---  File工具类
---
---@note  静态类
---@class File @parent class
---@public field name string 
---@type File
File= {
	_priveta_class_name = "File"}

---
---  文件是否存在
---
---@param path string  path:file路径
---@return boolean true为存在
function File:exist(path)
	return true
end

---
---  获取客户端根目录
---
---@return string 文件路径
function File:rootPath()
	return "string"
end

---
---  是否是文件夹
---
---@param path string  path:file路径
---@return boolean true是文件夹
function File:isDir(path)
	return true
end

---
---  是否是文件
---
---@param path string  path:file路径
---@return boolean true是文件
function File:isFile(path)
	return true
end

---
---  从文件中同步读取string
---
---@param path string  path:文件路径
---@return string 
function File:syncReadString(path)
	return "string"
end

---
---  同步写文件
---
---@param path string  path:写入文件路径
---@param content string  content: 写入内容
---@return number number 0: 成功, 其他失败
function File:syncWriteFile(path, content)
	return 0
end

---
---  将map内容同步写入文件
---
---@param path string  path:写入文件路径
---@param map Map  conent:写入内容
---@return number number 0: 成功, 其他失败
function File:syncWriteMap(path, map)
	return 0
end

---
---  将array内容同步写入文件
---
---@param path string  path:写入文件路径
---@param array_b Array  array:写入内容
---@return number number 0: 成功, 其他失败
function File:syncWriteArray(path, array_b)
	return 0
end

---
---  同步解压文件
---
---@param path string  source:待解压文件路径
---@param string_b string  targetPath:解压目的路径
---@return number number 0: 成功, 其他失败
function File:syncUnzipFile(path, string_b)
	return 0
end

---
---  异步解压文件
---
---@param path string  sourcePath:待解压文件路径
---@param string_b string  target:解压目的路径
---@param callback fun(code:number, sourcePath:string):void
---	 function(number code,String sourcePath)...end 
---		 code:解压结果，0 成功，其他失败 
---		 sourcePath:待解压文件路径
---@return File 
function File:asyncUnzipFile(path, string_b, callback)
	return self
end

---
---  异步写Array到文件中
---
---@param path string  path:写入文件路径
---@param content Array  content:写入文件内容
---@param asyncWriteArrayCallback fun(code:number, sourcePath:string):void
---	 function(number code,String sourcePath)...end 
---		 code:解压结果，0 成功，其他失败 
---		 sourcePath:待解压文件路径
---@return File 
function File:asyncWriteArray(path, content, asyncWriteArrayCallback)
	return self
end

---
---  异步写Map到文件中
---
---@param path string  path:写入文件路径
---@param content Map  content:写入文件内容
---@param asyncWriteMapCallback fun(code:number, sourcePath:string):void
---	 function(number code,String sourcePath)...end 
---		 code:解压结果，0 成功，其他失败 
---		 sourcePath:待解压文件路径
---@return File 
function File:asyncWriteMap(path, content, asyncWriteMapCallback)
	return self
end

---
---  异步写string到文件中
---
---@param path string  path:写入文件路径
---@param content string  content:写入内容
---@param asyncWriteFileCallback fun(code:number, path:string):void
---	 function(number code, String path)...end 
---		 code:写入状态，0: 成功, 其他失败 
---		 path:写入路径
---@return File 
function File:asyncWriteFile(path, content, asyncWriteFileCallback)
	return self
end

---
---  异步读取文件
---
---@param path <#type#>  path:文件路径
---@param asyncReadFileCallback <#type#>  function(number code, string fileContent)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 fileContent:读取的文件内容
---@return File 
function File:asyncReadFile(path, asyncReadFileCallback)
	return self
end

---
---  异步读取数组文件内容
---
---@param path string  path:文件路径
---@param asyncReadArrayFileCallback fun(code:number, array:Array):void
---	 function(number code, Array array)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 array:读取内容
---@return File 
function File:asyncReadArrayFile(path, asyncReadArrayFileCallback)
	return self
end

---
---  获取MLN存储主目录
---
---@return File 
function File:getStorageDir()
	return self
end

---
---  创建文件
---
---@param path string  path:文件路径
---@param asyncCreateFileCallback fun(code:number, filePath:string):void
---	 function(number code, string filePath)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 filePath:文件路径
---@return File 
function File:asyncCreateFile(path, asyncCreateFileCallback)
	return self
end

---
---  创建文件夹
---
---@param path string  path:文件夹路径
---@param asyncCreateDirsCallback fun(code:number, dirPath:string):void
---	 function(number code, string dirPath)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 dirPath:文件夹路径
---@return File 
function File:asyncCreateDirs(path, asyncCreateDirsCallback)
	return self
end

---
---  删除文件/文件夹
---
---@param path string  path:文件/文件夹路径
---@param asyncDeleteCallback fun(code:number, dirPath:string):void
---	 function(number code, string dirPath)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 path:文件/文件夹路径
---@return File 
function File:asyncDelete(path, asyncDeleteCallback)
	return self
end

---
---  移动文件/文件夹
---
---@param srcPath string  srcPath:源文件路径
---@param dstPath string  dstPath:目标文件路径
---@param asyncMoveFileCallback fun(code:number, srcPath:string):void
---	 function(number code, string srcPath)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 srcPath:源文件/文件夹路径
---@return File 
function File:asyncMoveFile(srcPath, dstPath, asyncMoveFileCallback)
	return self
end

---
---  拷贝文件/文件夹
---
---@param srcPath string  srcPath:源文件路径
---@param dstPath string  dstPath:目标文件路径
---@param asyncCopyFileCallback fun(code:number, srcPath:string):void
---	 function(number code, string srcPath)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 srcPath:源文件/文件夹路径
---@return File 
function File:asyncCopyFile(srcPath, dstPath, asyncCopyFileCallback)
	return self
end

---
---  获取指定文件夹下所有文件/文件夹
---
---@param srcPath string  srcPath:源文件路径
---@param recursive boolean  recursive:是否递归遍历子项
---@param asyncGetFileListCallback fun(code:number, srcPath:string):void
---	 function(number code, string srcPath)...end 
---		 code:读取状态，0: 成功, 其他失败 
---		 array:包含该文件夹下所有项的数组
---@return File 
function File:asyncGetFileList(srcPath, recursive, asyncGetFileListCallback)
	return self
end

---
---  获取文件属性
---
---@param filePath string  filePath:文件路径
---@return Map 返回文件属性Map, 文件大小：FileInfo.FileSize, 修改时间：FileInfo.ModiDate
function File:getFileInfo(filePath)
	return Map()
end

---
---  同步获取文件MD5值
---
---@param filePath string  filePath:文件路径(支持相对)
---@return fileMd5 file的Md5值
function File:syncMd5File(filePath)
	return fileMd5()
end

---
---  异步获取文件MD5值
---
---@param filePath string  filePath:文件路径(支持相对)
---@param asyncMd5FileCallback fun(fileMd5:string):void
---	 function(fileMd5)
---@return fileMd5 file的Md5值
function File:asyncMd5File(filePath, asyncMd5FileCallback)
	return fileMd5()
end

