mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-10 17:02:35 +08:00
27 lines
611 B
C++
Executable File
27 lines
611 B
C++
Executable File
#ifndef __FILE_ADAPTER_H__
|
|
#define __FILE_ADAPTER_H__
|
|
#include <widget/adapter.h>
|
|
namespace cdroid{
|
|
class FileItem{
|
|
public:
|
|
bool isDir;
|
|
size_t fileSize;
|
|
std::string fileName;
|
|
std::string fullpath;
|
|
FileItem();
|
|
FileItem(const FileItem&o);
|
|
};
|
|
|
|
class FileAdapter:public ArrayAdapter<FileItem>{
|
|
private:
|
|
std::string mResource;
|
|
public:
|
|
FileAdapter(const std::string&res):mResource(res){}
|
|
View*getView(int position, View* convertView, ViewGroup* parent)override;
|
|
int loadFiles(const std::string&path);
|
|
static std::string SimplifyPath(const std::string & path);
|
|
};
|
|
|
|
}
|
|
#endif
|