{"success":true,"data":{"ext":"dir","name":"DIR","description":"Director (DIR) is a legacy file format used by Macromedia Director, originally developed by Macromedia and later maintained by Adobe after its acquisition of the product line. It stores Director project data used to build interactive multimedia presentations, animations, games, and kiosk applications. The format is largely obsolete, and files may depend on older runtime environments; as with other legacy media files, they should be opened only with trusted software.","mime":["application/x-director"],"risk_level":"Safe","signatures":[{"hex":"52 49 46 58","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"4D 56 39 33","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["dcr","dxr","drx"],"usage":{"python":"def is_dir(file_path: str) -> bool:\n    \"\"\"Check if file is a valid DIR by magic bytes.\"\"\"\n    signature = bytes([0x52, 0x49, 0x46, 0x58])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isDIR(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x52, 0x49, 0x46, 0x58]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsDIR(data []byte) bool {\n    signature := []byte{0x52, 0x49, 0x46, 0x58}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}