public IItemNode GetFileInfo(IItemNode node) { switch (node.GetRoot.RootType.Type) { case CloudType.Dropbox: return(Dropbox.GetMetaData(node)); case CloudType.GoogleDrive: Drivev2_File item = GoogleDrive.GetMetadataItem(node); node.Info.Size = item.fileSize ?? -1; node.Info.Name = item.title; node.Info.DateMod = item.modifiedDate ?? DateTime.Now; return(node); case CloudType.LocalDisk: return(LocalDisk.GetFileInfo(node)); case CloudType.Mega: return(MegaNz.GetItem(node)); default: throw new UnknowCloudNameException("Error Unknow Cloud Type: " + node.GetRoot.RootType.Type.ToString()); } }
public ExplorerNode GetFileInfo(ExplorerNode node) { switch (node.GetRoot.NodeType.Type) { case CloudType.Dropbox: return(Dropbox.GetMetaData(node)); case CloudType.GoogleDrive: GD_item item = GoogleDrive.GetMetadataItem(node); node.Info.Size = item.fileSize; node.Info.Name = item.title; node.Info.DateMod = DateTime.Parse(item.modifiedDate); return(node); case CloudType.LocalDisk: return(LocalDisk.GetFileInfo(node)); case CloudType.Mega: return(MegaNz.GetItem(node)); default: throw new UnknowCloudNameException("Error Unknow Cloud Type: " + node.GetRoot.NodeType.Type.ToString()); } }