fromFile static method

XFile fromFile(
  1. File file
)

Creates XFile instance from a File

Implementation

static XFile fromFile(File file) {
  return XFile(
    file.absolute.path,
    length: file.lengthSync(),
    mimeType: mime.lookupMimeType(file.absolute.path),
    name: path.basename(file.absolute.path),
  );
}