// Path: app/src/main/java/com/paulds/simpleftp/data/entities/FileEntity.java
// public class FileEntity implements Comparable<FileEntity> {
// 
//     /**
//      * The file name.
//      */
//     private String name;
// 
//     /**
//      * The file path.
//      */
//     private String path;
// 
//     /**
//      * The file size.
//      */
//     private Long size;
// 
//     /**
//      * Indicates whether this file is a directory.
//      */
//     private boolean isDirectory;
// 
//     /**
//      * Gets the file name.
//      * @return The file name.
//      */
//     public String getName() {
//         return name;
//     }
// 
//     /**
//      * Sets the file name.
//      * @param name The file name.
//      */
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     /**
//      * Gets the file path.
//      * @return The file path.
//      */
//     public String getPath() {
//         return path;
//     }
// 
//     /**
//      * Sets the file path.
//      * @param path The file path.
//      */
//     public void setPath(String path) {
//         this.path = path;
//     }
// 
//     /**
//      * Gets the file size.
//      * @return The file size.
//      */
//     public Long getSize() {
//         return size;
//     }
// 
//     /**
//      * Sets the file size.
//      * @param size The file size.
//      */
//     public void setSize(long size) {
//         this.size = size;
//     }
// 
//     /**
//      * Indicates whether this file is a directory.
//      * @return true if the file is a directory; false otherwise
//      */
//     public boolean isDirectory() {
//         return isDirectory;
//     }
// 
//     /**
//      * Set a value indicating whether this file is a directory.
//      * @param isDirectory true if the file is a directory; false otherwise
//      */
//     public void setIsDirectory(boolean isDirectory) {
//         this.isDirectory = isDirectory;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public int compareTo(FileEntity file) {
//         if(this.isDirectory() && !file.isDirectory()) {
//             return -1;
//         }
//         else if(!this.isDirectory() && file.isDirectory()) {
//             return 1;
//         }
//         else {
//             return this.getName().compareToIgnoreCase(file.getName());
//         }
//     }
// }


import android.databinding.Bindable;
import android.databinding.ObservableBoolean;
import android.view.View;
import com.paulds.simpleftp.R;
import com.paulds.simpleftp.data.entities.FileEntity;
package com.paulds.simpleftp.presentation.model;



/**
 * Model for displaying a file in a view.
 *
 * @author Paul-DS
 */
public class FileViewModel {
    /**
     * The main view model
     */
    private ExplorerViewModel mainViewModel;

    /**
     * A value indicating whether this file is a directory.
     */
    private boolean isDirectory;

    /**
     * The file name.
     */
    private String name;

    /**
     * The file path.
     */
    private String path;

    /**
     * The file size.
     */
    private Long size;

    /**
     * The icon representing the file.
     */
    private int icon;

    /**
     * Indicates whether the file item is selected.
     */
    public ObservableBoolean isSelected;

    /**
     * Default constructor.
     * @param mainViewModel The parent view model.
     */
// Path: app/src/main/java/com/paulds/simpleftp/data/entities/FileEntity.java
// public class FileEntity implements Comparable<FileEntity> {
// 
//     /**
//      * The file name.
//      */
//     private String name;
// 
//     /**
//      * The file path.
//      */
//     private String path;
// 
//     /**
//      * The file size.
//      */
//     private Long size;
// 
//     /**
//      * Indicates whether this file is a directory.
//      */
//     private boolean isDirectory;
// 
//     /**
//      * Gets the file name.
//      * @return The file name.
//      */
//     public String getName() {
//         return name;
//     }
// 
//     /**
//      * Sets the file name.
//      * @param name The file name.
//      */
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     /**
//      * Gets the file path.
//      * @return The file path.
//      */
//     public String getPath() {
//         return path;
//     }
// 
//     /**
//      * Sets the file path.
//      * @param path The file path.
//      */
//     public void setPath(String path) {
//         this.path = path;
//     }
// 
//     /**
//      * Gets the file size.
//      * @return The file size.
//      */
//     public Long getSize() {
//         return size;
//     }
// 
//     /**
//      * Sets the file size.
//      * @param size The file size.
//      */
//     public void setSize(long size) {
//         this.size = size;
//     }
// 
//     /**
//      * Indicates whether this file is a directory.
//      * @return true if the file is a directory; false otherwise
//      */
//     public boolean isDirectory() {
//         return isDirectory;
//     }
// 
//     /**
//      * Set a value indicating whether this file is a directory.
//      * @param isDirectory true if the file is a directory; false otherwise
//      */
//     public void setIsDirectory(boolean isDirectory) {
//         this.isDirectory = isDirectory;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public int compareTo(FileEntity file) {
//         if(this.isDirectory() && !file.isDirectory()) {
//             return -1;
//         }
//         else if(!this.isDirectory() && file.isDirectory()) {
//             return 1;
//         }
//         else {
//             return this.getName().compareToIgnoreCase(file.getName());
//         }
//     }
// }


// Path: app/src/main/java/com/paulds/simpleftp/presentation/model/FileViewModel.java
import android.databinding.Bindable;
import android.databinding.ObservableBoolean;
import android.view.View;
import com.paulds.simpleftp.R;
import com.paulds.simpleftp.data.entities.FileEntity;

package com.paulds.simpleftp.presentation.model;



/**
 * Model for displaying a file in a view.
 *
 * @author Paul-DS
 */
public class FileViewModel {
    /**
     * The main view model
     */
    private ExplorerViewModel mainViewModel;

    /**
     * A value indicating whether this file is a directory.
     */
    private boolean isDirectory;

    /**
     * The file name.
     */
    private String name;

    /**
     * The file path.
     */
    private String path;

    /**
     * The file size.
     */
    private Long size;

    /**
     * The icon representing the file.
     */
    private int icon;

    /**
     * Indicates whether the file item is selected.
     */
    public ObservableBoolean isSelected;

    /**
     * Default constructor.
     * @param mainViewModel The parent view model.
     */
    public FileViewModel(ExplorerViewModel mainViewModel) {