Added custom ftype and directory? methods and underlying code required to implement them.