- milestone: --> v0_2
Зачем:
Это независимые сущности: одну и ту же структуру можно просматривать многими способами.
Как:
interface IFS{
Folder current, root;
}
interface File{
Folder parent; // = null of root
String name, description, owner, alternateName;
Bool isFolder;
TimeStamp creationTime, lastAccessTime, lastWriteTime;
long size;
FileProperties properties, // сюда входят все свойства
customProperties; // сюда только кастомные
// Атрибуты в виде булевых признаков
boolean
isReadOnly, //Read-only file. Attribute is read/write.
isHidden, //Hidden file. Attribute is read/write.
isSystem, //System file. Attribute is read/write.
isVolume, //Disk drive volume label. Attribute is read-only.
isDirectory, //Folder or directory. Attribute is read-only.
isArchive, //File has changed since last backup. Attribute is read/write.
isAlias, //Link or shortcut. Attribute is read-only.
isCompressed, //Compressed file. Attribute is read-only.
isEncrypted; // File is encrypted
}
interface Folder extends File, Files{
File createFile(String fileName); // create the file with name filename
void copyFrom(Files files);
void copyFrom(File file);
void moveFrom(File file);
void moveFrom(Files files);
}
interface Properties=collection of <Property>;
interface Property{
PropertyDescription description;
String AsString;
}
interface Files extends collection of <File>{
PropertyDescriptions propertries;
boolean has(File f); // принадлежит ли f коллекции
void add(File f)
void addFiles(Files f)
void remove(File f)
}
interface PropertyDescriptions=collection of <PropertyDescription>;
interface PropertyDescription{
String type;
Integer width;
String description; //???
}
enum PanelType{
ptFile //Обычная файловая панель
ptTree //Панель, отображающая дерево (Tree)
ptQView// Панель быстрого просмотра (Quick View)
ptInfo //Панель информации (Information)
}
interface Panel{
Folder contents; // та папка содержимое которой отображает панель
Columns columns;
Files selected;
PanelType type;
Bool isPlugin, isVisible, isActive;
File top; //=topItem
File current;
viewMode;
PropertyOrder order;
}
interface Columns:Collection<Column>{
Column byProperty(PropertyDescription property);
};
interface Column{
PropertyDescription property;
Int width;
};
interface PropertyOrder{
PropertyDescription property;
Direction direction;
};
enum Direction {ascending, descending};